3. Write SQL queries for (i) …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
3. Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii),
which are based on the tables :
(i) To display the CODE and NAME of all SALESPERSON having “I7” Item
Type Code from the table SALESPERSON.
(ii) To display all details from table SALESPERSON in descending order of
SALARY.
(iii) To display the number of SALESPERSON dealing in each TYPE of ITEM.
(Use ITCODE for the same)
(iv) To display NAME of all the salespersons from the SALESPERSON table
along with their corresponding ITEMTYPE from the ITEM table.
(v) SELECT MAX(SALARY) FROM SALESPERSON;
(vi) SELECT DISTINCT ITCODE FROM SALESPERSON;
(vii) SELECT CODE,NAME, I.ITCODE
FROM SALESPERSON S, ITEM I
WHERE S.ITCODE=I.ITCODE AND TURNOVER>=700000;
(viii) SELECT SUM(SALARY) FROM SALESPERSON
WHERE ITCODE=”I2”;
Posted by Suriya Moorthy Surdhan 3 years, 8 months ago
- 0 answers
ANSWER
Related Questions
Posted by Manoj Kumar Manoj Kumar 2 months, 3 weeks ago
- 0 answers
Posted by Priya Shukla 4 weeks, 1 day ago
- 1 answers
Posted by Kandeepan Jothivel 2 months ago
- 2 answers
Posted by Gaya Thri 3 months ago
- 1 answers
Posted by Syedali Fathima 1 month ago
- 1 answers
Posted by Prawar Narang 1 month, 3 weeks ago
- 1 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app