Looking for Retake | Database Management Systems | Aldiyar Salkenov test answers and solutions? Browse our comprehensive collection of verified answers for Retake | Database Management Systems | Aldiyar Salkenov at moodle.astanait.edu.kz.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
A SQL query will NOT work if there are no indexes on the relations
Evaluate the following query:
SELECT prod_name FROM products
WHERE prod_id IN (SELECT prod_id FROM products
WHERE prod_list_price = (SELECT MAX(prod_list_price)FROM products WHERE prod_list_price < (SELECT MAX(prod_list_price)FROM products)));
What would be the outcome of executing the above SQL statement?
Statement 1: SELECT promo_category, SUM(promo_cost)
FROM promotions
WHERE promo_end_date - promo_begin_date > 30
GROUP BY promo_category;
Statement 2 : SELECT promo_category, SUM(promo_cost)
FROM promotions
GROUP BY promo_category HAVING MIN(promo_end_date-promo_begin_date)>30;
Which statement is true regarding the above two SQL statements?
How many records does the following SQL statement generate?SELECT * FROM EXAM_RESULTS WHERE LAST_NAME LIKE '%N%' AND EXAM_SCORE > 88;
Table EXAM_RESULTS
| STUDENT_ID | FIRST_NAME | LAST_NAME | EXAM_ID | EXAM_SCORE |
| 10 | LAURA | LYNCH | 1 | 90 |
| 10 | LAURA | LYNCH | 2 | 85 |
| 11 | GRACE | BROWN | 1 | 78 |
| 11 | GRACE | BROWN | 2 | 72 |
| 12 | JAY | JACKSON | 1 | 95 |
| 12 | JAY | JACKSON | 2 | 92 |
| 13 | WILLIAM | BISHOP | 1 | 70 |
| 13 | WILLIAM | BISHOP | 2 | 100 |
| 14 | CHARLES | PRADA | 2 | 85 |
Which of the following is correct to count the total salary in "deptno" wise where more than two employees exist?
Table SALES
| Column Name |
| STORE_ID |
| SALES_DATE |
| SALES_AMOUNT |
How many records does the following SQL statement return?SELECT * FROM EXAM_RESULTS WHERE STUDENT_ID <= 12 AND EXAM_SCORE > 85;
Table EXAM_RESULTS
| STUDENT_ID | FIRST_NAME | LAST_NAME | EXAM_ID | EXAM_SCORE |
| 10 | LAURA | LYNCH | 1 | 90 |
| 10 | LAURA | LYNCH | 2 | 85 |
| 11 | GRACE | BROWN | 1 | 78 |
| 11 | GRACE | BROWN | 2 | 72 |
| 12 | JAY | JACKSON | 1 | 95 |
| 12 | JAY | JACKSON | 2 | 92 |
| 13 | WILLIAM | BISHOP | 1 | 70 |
| 13 | WILLIAM | BISHOP | 2 | 100 |
| 14 | CHARLES | PRADA | 2 | 85 |
Table B
| ID |
|---|
| 1 |
| 2 |
| 3 |
| ID |
|---|
| 4 |
| 5 |
| 6 |
SELECT __________ FROM instructor WHERE dept_name= 'Comp. Sci.';
Which of the following should be used to find the mean of the salary?