GRUPO A


1. SELECT * FROM VENDEDORES 2. SELECT * FROM VENDEDORES WHERE NOMBRES LIKE '%RUTA%' 3. SELECT * FROM VENDEDORES WHERE NOMBRES="ANACLETO RIVERA" 4. SELECT * FROM PRODUCTOS 5. SELECT * FROM PRODUCTOS WHERE UNIVEN="B10" 6. SELECT * FROM VENDEDORES WHERE NOMBRES LIKE '%VENDEDOR%' 7. SELECT * FROM VENDEDORES WHERE CODVEN LIKE '6314%' 8. SELECT * FROM VENDEDORES WHERE CODVEN LIKE '%40' 9. SELECT * FROM VENDEDORES WHERE CARNET LIKE '38%' 10. SELECT * FROM ALMACENES 11. SELECT CODALM, COUNT(*) FROM MAEMOV WHERE TIPDOC='D' GROUP BY 1 12a. SELECT CODALM, COUNT(*) FROM MAEMOV WHERE TIPDOC='D' OR TIPDOC='V' GROUP BY 1 12b. SELECT CODALM, TIPDOC, COUNT(*) FROM MAEMOV WHERE TIPDOC='D' OR TIPDOC='V' GROUP BY 1,2 13a. SELECT A.CODALM, SUM(B.CANTIDAD) FROM MAEMOV A, DETMOV B WHERE A.NRODOC = B.NRODOC GROUP BY 1 13b. SELECT MAEMOV.CODALM, SUM(DETMOV.CANTIDAD) FROM MAEMOV, DETMOV WHERE MAEMOV.NRODOC = DETMOV.NRODOC GROUP BY 1 14a. SELECT * FROM MAEMOV WHERE CODVEN='65207' AND TIPDOC = 'D' OR TIPDOC = 'V' 14b. SELECT * FROM MAEMOV WHERE CODVEN='65207' AND ( TIPDOC = 'D' OR TIPDOC = 'V' ) 14c. SELECT * FROM MAEMOV WHERE CODVEN='65207' AND TIPDOC IN ('D','V') 15. SELECT CODVEN, TIPDOC, COUNT(*) FROM MAEMOV GROUP BY CODVEN, TIPDOC 16. SELECT MONTH(FECHA), SUM(CANTIDAD) FROM DETMOV GROUP BY 1

GRUPO B


1a. SELECT PRODUCTOS.*, UNIDADES.DESCRIPCION FROM PRODUCTOS, UNIDADES WHERE PRODUCTOS.UNIVEN = UNIDADES.UNIVEN 1b. SELECT A.*, B.DESCRIPCION FROM PRODUCTOS A, UNIDADES B WHERE A.UNIVEN = B.UNIVEN 2a. SELECT A.DESCRIPCION FROM MAEMOV B, DETMOV C, PRODUCTOS A WHERE B.NRODOC = C.NRODOC AND C.CODPROD = A.CODPROD AND B.CODVEN = '65180' ORDER BY 1 2b. SELECT DISTINCT A.DESCRIPCION FROM MAEMOV B, DETMOV C, PRODUCTOS A WHERE B.NRODOC = C.NRODOC AND C.CODPROD = A.CODPROD AND B.CODVEN = '65180' ORDER BY 1 3. SELECT B.NOMBRES, A.FECHA, A.TIPDOC FROM MAEMOV A, VENDEDORES B WHERE A.CODVEN = B.CODVEN AND A.NRODOC = 2102 4. SELECT B.NOMBRES FROM MAEMOV A, VENDEDORES B WHERE A.CODVEN = B.CODVEN AND A.FECHA = '2010/04/27' AND A.TIPDOC='D' 5a. SELECT B.NOMBRES FROM MAEMOV A, VENDEDORES B WHERE A.CODVEN = B.CODVEN AND A.FECHA IN ('2010/06/01','2010/06/06') AND A.TIPDOC='D' 5b. SELECT B.NOMBRES FROM MAEMOV A, VENDEDORES B WHERE A.CODVEN = B.CODVEN AND (A.FECHA='2010/06/01' OR A.FECHA='2010/06/06') AND A.TIPDOC='D' 6. SELECT B.DESCRIPCION, A.CANTIDAD, A.PU FROM DETMOV A, MAEMOV C, PRODUCTOS B WHERE A.CODPROD = B.CODPROD AND A.NRODOC = C.NRODOC AND A.NRODOC = 380 AND C.TIPDOC='D' 7. SELECT B.DESALM FROM MAEMOV A, ALMACENES B WHERE A.CODALM = B.CODALM AND A.NRODOC= 1345 8. SELECT A.DESCRIPCION FROM PRODUCTOS A, UNIDADES B WHERE A.UNIVEN = B.UNIVEN AND B.DESCRIPCION='PAQUETE DE 6 UNIDADE' 9. SELECT DISTINCT B.NOMBRES FROM MAEMOV A, VENDEDORES B WHERE A.CODVEN = B.CODVEN AND A.FECHA = '2010/05/12' ORDER BY 1

GRUPO C


1. SELECT DISTINCT B.NOMBRES, C.DESALM FROM MAEMOV A, VENDEDORES B, ALMACENES C WHERE A.CODVEN = B.CODVEN AND A.CODALM = C.CODALM AND A.FECHA = '2010/05/27' ORDER BY 1 2a. SELECT DISTINCT C.NOMBRES, D.DESCRIPCION FROM MAEMOV A, DETMOV B, VENDEDORES C, PRODUCTOS D WHERE A.NRODOC = B.NRODOC AND A.CODVEN = C.CODVEN AND B.CODPROD = D.CODPROD AND A.FECHA BETWEEN '2010/05/27' AND '2010/05/31' ORDER BY 1 2b. SELECT DISTINCT C.NOMBRES, D.DESCRIPCION FROM MAEMOV A, DETMOV B, VENDEDORES C, PRODUCTOS D WHERE A.NRODOC = B.NRODOC AND A.CODVEN = C.CODVEN AND B.CODPROD = D.CODPROD AND A.FECHA >= '2010/05/27' AND A.FECHA <= '2010/05/31' ORDER BY 1 3a. SELECT C.DESCRIPCION FROM DETMOV A, MAEMOV B, PRODUCTOS C, VENDEDORES D WHERE A.NRODOC = B.NRODOC AND A.CODPROD = C.CODPROD AND B.CODVEN = D.CODVEN AND D.NOMBRES LIKE '%CAMACHO%' 3b. SELECT DISTINCT C.DESCRIPCION FROM DETMOV A, MAEMOV B, PRODUCTOS C, VENDEDORES D WHERE A.NRODOC = B.NRODOC AND A.CODPROD = C.CODPROD AND B.CODVEN = D.CODVEN AND D.NOMBRES LIKE '%CAMACHO%' 3c. SELECT DISTINCT C.DESCRIPCION FROM DETMOV A, MAEMOV B, PRODUCTOS C, VENDEDORES D WHERE A.NRODOC = B.NRODOC AND A.CODPROD = C.CODPROD AND B.CODVEN = D.CODVEN AND D.NOMBRES LIKE '%CAMACHO%' ORDER BY 1

GRUPO D


1. SELECT MONTH(A.FECHA), SUM(A.PU*A.CANTIDAD) FROM DETMOV A, MAEMOV B WHERE A.NRODOC = B.NRODOC AND B.TIPDOC='D' GROUP BY 1 2. SELECT MONTH(A.FECHA), B.CODVEN, SUM(A.PU*A.CANTIDAD) FROM DETMOV A, MAEMOV B WHERE A.NRODOC = B.NRODOC AND B.TIPDOC='D' GROUP BY 1,2 3. SELECT MONTH(A.FECHA), B.DESCRIPCION, SUM(A.CANTIDAD), SUM(A.PU*A.CANTIDAD) FROM DETMOV A, PRODUCTOS B, MAEMOV C WHERE A.CODPROD = B.CODPROD AND A.NRODOC=C.NRODOC AND C.TIPDOC='D' GROUP BY 1,2 4. SELECT MONTH(A.FECHA), B.CODALM, SUM(A.CANTIDAD), SUM(A.PU*A.CANTIDAD) FROM DETMOV A, MAEMOV B WHERE A.NRODOC=B.NRODOC AND B.TIPDOC='D' GROUP BY 1,2 5. SELECT MONTH(A.FECHA), SUM(A.CANTIDAD),SUM(A.PU*A.CANTIDAD) FROM DETMOV A, MAEMOV B WHERE A.NRODOC=B.NRODOC AND B.TIPDOC='D' GROUP BY 1 6. SELECT B.CODALM, B.CODVEN, B.TIPDOC, SUM(A.CANTIDAD), SUM(A.PU*A.CANTIDAD) FROM DETMOV A, MAEMOV B WHERE A.NRODOC=B.NRODOC AND B.TIPDOC IN ('D','V') GROUP BY 1,2,3 7a. SELECT DESCRIPCION FROM PRODUCTOS WHERE CODPROD NOT IN ( SELECT CODPROD FROM DETMOV WHERE FECHA BETWEEN '2010/05/01' AND '2010/05/31' ) 7b. SELECT DESCRIPCION FROM PRODUCTOS WHERE CODPROD NOT IN ( SELECT CODPROD FROM DETMOV WHERE MONTH(FECHA)=5 ) 8a. SELECT NOMBRES FROM VENDEDORES WHERE CODVEN NOT IN ( SELECT CODVEN FROM MAEMOV WHERE FECHA BETWEEN '2010/04/01' AND '2010/04/30' ) 8b. SELECT NOMBRES FROM VENDEDORES WHERE CODVEN NOT IN ( SELECT CODVEN FROM MAEMOV WHERE MONTH(FECHA) = 4 ) 9a. SELECT NOMBRES FROM CLIENTES WHERE CODCLI NOT IN ( SELECT CODCLI FROM MAEMOV WHERE MONTH(FECHA) IN (4,5,6) ) 9b. SELECT NOMBRES FROM CLIENTES WHERE CODCLI NOT IN ( SELECT CODCLI FROM MAEMOV WHERE FECHA>='2010/04/01' AND FECHA<='2010/06/30' ) 9c. SELECT NOMBRES FROM CLIENTES WHERE CODCLI NOT IN ( SELECT CODCLI FROM MAEMOV WHERE FECHA BETWEEN '2010/04/01' AND '2010/06/30' )