¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Corrections

Patrick Lafferty 23 preguntas

Hacer el test

Preguntas del test (23)

  1. 1CUBE will cross-reference the columns listed in the ______ clause to create a superset of groups.
    1. AGROUP BY
    2. BWHERE
    3. CSELECT
  2. 2You use GROUPING functions to:
    1. AProduce subtotal and cross-tabulated values
    2. BIdentify the extra row values created by either a ROLLUP or CUBE operation
    3. CAggregate rows using SUM, MIN, MAX, and COUNT
  3. 3The EMPLOYEES table contains these columns:
    ID_NUMBER NUMBER Primary Key
    NAME VARCHAR2 (30)
    DEPARTMENT_ID NUMBER
    SALARY NUMBER (7,2)
    HIRE_DATE DATE
    Evaluate this SQL statement:
    SELECT id_number, name, department_id, SUM(salary)
    FROM employees
    WHERE salary > 25000
    GROUP BY department_id, id_number, name
    ORDER BY hire_date;
    Why will this statement cause an error?
    1. AThe HAVING clause is missing.
    2. BThe WHERE clause contains a syntax error.
    3. CThe WHERE clause contains a syntax .
    4. DThe HIRE_DATE column is NOT included in the GROUP BY clause.
  4. 4The PRODUCTS table contains these columns:
    PRODUCT_ID NUMBER(9) PK
    CATEGORY_ID VARCHAR2(10)
    LOCATION_ID NUMBER(9)
    DESCRIPTION VARCHAR2(30)
    COST NUMBER(7,2)
    PRICE NUMBER(7,2)
    QUANTITY NUMBER
    You display the total of the extended costs for each product category by location.
    You need to include only the products that have a price less than $25.00.
    The extended cost of each item equals the quantity value multiplied by the cost value.
    Which SQL statement will display the desired result?
    1. ASELECT category_id, SUM(cost * quantity) TOTAL,location_id
      FROM products
      WHERE price > 25.00
      GROUP BY category_id, location_id;
    2. BSELECT SUM(cost * quantity) TOTAL, location_id
      FROM products
      WHERE price < 25.00
      GROUP BY location_id;
    3. CSELECT category_id, SUM(cost * quantity) TOTAL, location_id
      FROM products
      WHERE price < 25.00
      GROUP BY category_id, location_id;
    4. DSELECT SUM(cost * quantity) TOTAL
      FROM products
      WHERE price < 25.00;
  5. 5The PLAYERS and TEAMS tables contain these columns:
    PLAYERS
    PLAYER_ID NUMBER NOT NULL, PRIMARY KEY
    LAST_NAME VARCHAR2 (30) NOT NULL
    FIRST_NAME VARCHAR2 (25) NOT NULL
    TEAM_ID NUMBER
    POSITION VARCHAR2 (25)
    TEAMS
    TEAM_ID NUMBER NOT NULL, PRIMARY KEY
    TEAM_NAME VARCHAR2 (25)
    You need to create a report that lists the names of each team with more than three goal keepers.
    Which SELECT statement will produce the desired result?
    1. ASELECT t.team_name, COUNT(p.player_id)
      FROM players p, teams t
      ON (p.team_id = t.team_id)
      WHERE UPPER(p.position) = 'GOAL KEEPER'
      GROUP BY t.team_name;
    2. BSELECT t.team_name, COUNT(p.player_id)
      FROM players
      JOIN teams t ON (p.team_id = t.team_id)
      WHERE UPPER(p.position) = 'GOAL KEEPER'
      HAVING COUNT(p.player_id) > 3;
    3. CSELECT t.team_name, COUNT(p.player_id)
      FROM players p, teams t
      ON (p.team_id = t.team_id)
      WHERE UPPER(p.position) = 'GOAL KEEPER'
      GROUP BY t.team_name
      HAVING COUNT(p.player_id) > 3;
    4. DSELECT t.team_name, COUNT(p.player_id)
      FROM players p
      JOIN teams t ON (p.team_id = t.team_id)
      WHERE UPPER(p.position) = 'GOAL KEEPER'
      GROUP BY t.team_name
      HAVING COUNT(p.player_id) > 3;
  6. 6If a select list contains both a column as well as a group function then what clause is required?
    1. AHAVING clause
    2. BJOIN clause
    3. CORDER BY clause
    4. DGROUP BY clause
  7. 7Group functions can be nested to a depth of?
    1. AThree
    2. BFour
    3. CTwo
    4. DGroup function cannot be nested
  8. 8The EMPLOYEES table contains the following columns:
    EMPLOYEE_ID NUMBER(10) PRIMARY KEY
    LAST_NAME VARCHAR2(20)
    FIRST_NAME VARCHAR2(20)
    DEPARTMENT VARCHAR2(20)
    HIRE_DATE DATE
    SALARY NUMBER(10)
    You want to create a report that includes each employee's last name, employee identification number, date of hire, and salary. The report should include only those employees who have been with the company for more than one year and whose salary exceeds $40,000.
    Which of the following SELECT statements will accomplish this task?
    1. ASELECT employee_id, last_name, salary
      FROM employees
      WHERE salary > 40000
      AND hire_date =
      (SELECT hire_date
      FROM employees
      WHERE (sysdate-hire_date) / 365 > 1);
    2. BSELECT employee_id, last_name, hire_date, salary
      FROM employees
      WHERE salary > 40000 AND hire_date =
      (SELECT hire_date
      FROM employees
      WHERE (sysdate-hire_date) / 365 > 1);
    3. CSELECT employee_id, last_name, hire_date, salary
      FROM employees
      WHERE salary > 40000
      AND (sysdate-hire_date) / 365 > 1;
    4. DSELECT employee_id, last_name, salary
      FROM employees
      WHERE salary > 40000
      AND hire_date IN (sysdate-hire_date) / 365 > 1);
  9. 9Which statement about group functions is true?
    1. AGroup functions ignore null values.
    2. BGroup functions can only be used in a SELECT list.
    3. CGroup functions can be used in a WHERE clause.
    4. DA query that includes a group function in the SELECT list must include a GROUP BY clause.
  10. 10Evaluate this SELECT statement:
    SELECT COUNT(employee_id), department_id
    FROM employees
    GROUP BY department_id;
    You only want to include employees who earn more than 15000.
    Which clause should you include in the SELECT statement?
    1. AWHERE salary > 15000
    2. BHAVING salary > 15000
    3. CWHERE SUM(salary) > 15000
    4. DHAVING SUM(salary) > 15000

Información

Descripción
Correct of oracle assesment
Idioma
English
Visitas
107
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?