GoConqr has a new look! Let us know what you think.

Quiz

practice finals

gerald david 15 questions

Take the quiz

Questions in this quiz (15)

  1. 1
    1. SELECT cus_areacode, SUM(*)
    2. FROM CUSTOMER
    3. GROUP BY cus_areacode;
    The above statement has:
    1. Ano error
    2. Berror in line 1
    3. Cerror in line 2
    4. Derror in line 3
  2. 21. SELECT P_PRICE
    2. FROM PRODUCT
    3. WHERE P_PRICE > AVG(P_PRICE);
    The above statement has:
    1. Ano error
    2. Berror in line 1
    3. Cerror in line 2
    4. Derror in line 3
  3. 3SELECT cus_lname, cus_fname
    FROM customer
    GROUP BY cus_lname;

    Does the above statement have syntax error?
    1. Ayes, it has an error
    2. Bno, it has no error
  4. 4SELECT CUS_CODE, CUS_LNAME
    FROM customer
    WHERE CUS_FNAME IS NOT NULL;

    Does the above statement have syntax error?
    1. Ayes
    2. Bno
    3. Cinformation provided is not sufficient for this question.
  5. 5The p_qoh column in PRODUCT table contains quantity on hand. If you want to know how many units of all products combined are on hand, which of the following SQL statements should you use?
    1. ASELECT SUM (p_qoh) FROM PRODUCT;
    2. BSELECT COUNT (p_qoh) FROM PRODUCT:
    3. CSELECT SUM (COUNT(p_qoh)) FROM PRODUCT;
    4. DNone of the above
  6. 6Suppose you want to display products whose price is more than $10 but less than or equal to $20. Which of the following WHERE clauses is the correct clause for this purpose?
    1. AWHERE p_price > 10 and < 20;
    2. BWHERE p_price >= 10 and p_price <= 20;
    3. CWHERE p_price between 10 and 20;
    4. DNone of the above
  7. 7If you want to display customers whose last name if Lee, which of the following WHERE clauses is the correct clause for this purpose?
    1. AWHERE cus_lname like ‘%Lee;
    2. BWHERE cus_lname like ‘Lee%’;
    3. CWHERE cus_lname like ‘Lee’;
  8. 8Suppose you want to display AVG customer balance by area code and write the following SQL statement to do that. Does this statement contain any errors, and if so, what’s the error?

    SELECT cus_areacode, avg(cus_balance)
    FROM customer
    ORDER by cus_areacode;
    1. AIt has no error
    2. BIt has an error; the cus_areacode column must be qualified
    3. CIt has an error; the order by clause must not be included
    4. DIt has an error; a group by clause must be included
  9. 9If you want to display customers whose last name is not Lee.
    Which of the following where clauses is the correct clause for this purpose?
    1. AWHERE cus_lname > ‘Lee’;
    2. BWHERE cus_lname < > ‘Lee’;
    3. CWHERE cus_lname NOT LIKE ‘Lee’;
    4. DNone of the above
  10. 10Suppose you want to display customers codes are 123 and 456. Which of the following WHERE clauses is the correct clause for this purpose?
    1. AWHERE cus_code = 123 or 456;
    2. BWHERE cus_code = 123 and 456;
    3. CWHERE cus_code = 123 and cus_code = 456;
    4. DNone of the above

Information

Description
Quiz on practice finals, created by gerald david on 23/05/2017.
Language
English
Views
0
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?