1. What is the character position of ‘O’ of the description Microware Oven from
ID: 3902900 • Letter: 1
Question
1. What is the character position of ‘O’ of the description Microware Oven from parts when this SQL statement is executed?
SELECT INSTR(DESCRIPTION,'O') FROM PART;
2.
How many warehouse are there when this SQL statement is executed?
SELECT COUNT(WAREHOUSE) FROM PARTS;
3.
How many warehouse are there when this SQL statement is executed?
SELECT COUNT(distinct WAREHOUSE) FROM PARTS;
4.
How many warehouse are there when this SQL statement is executed?
SELECT COUNT(*) FROM PARTS;
Quiz Type: Set B- Application - LongQuiz002 PART DESCRIPTION ONHAND CLASS WAREHOUSE - - - - - - - - - - - - - - - - - - -- ---------- ----- ---------- AT94 IRON BV06 HOME GYM CD52 MICROWAVE OVEN DL71 CORDLESS DRILL DR93 GAS RANGE DW11 WASHER FD21 STAND MIXER KL62 DRYER KTO3 DISHWASHER KV29 TREADMILL 50 HW 45 SG 32 AP 21 HW 21 AP 12 AP 22 HW 12 AP 8 AP 9 SG PRICE ---------- 2495 79495 165 12995 495 399 159 349 595 1390Explanation / Answer
1) returns 5. INSTR function returns first occurence of given string. So in microwave first occurence of O is at position 5.
2)returns 10. Since 10 is the number of rows in the table it will return 10.
3) returns 3. Since number of distinct elements in warehouse column is 3.
4)returns 10, the number of rows in table
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.