English

Write the output of the queries based on the table, TECH_COURSE given below: Table: TECH_COURSE CID CNAME FEES STARTDATE TID SELECT DISTINCT TID FROM TECH_COURSE; SELECT TID, COUNT(*)

Advertisements
Advertisements

Question

Write the output of the queries based on the table, TECH_COURSE given below:

Table: TECH_COURSE
CID CNAME FEES STARTDATE TID
C201 Animation and VFX 12000 2022-07-02 101
C202 CADD 15000 2021-11-15 NULL
C203 DCA 10000 2020-10-01 102
C204 DDTP 9000 2021-09-15 104
C205 Mobile Application
Development
18000 2022-11-01 101
C206 Digital Marketing 16000 2022-07-25 103
  1. SELECT DISTINCT TID FROM TECH_COURSE;
  2. SELECT TID, COUNT(*), MIN(FEES) FROM TECH_COURSE GROUP BY TID HAVING COUNT(TID)>1;
  3. SELECT CNAME FROM TECH_COURSE WHERE FEES>15000 ORDER BY CNAME;
  4. SELECT AVG(FEES) FROM TECH_COURSE WHERE FEES BETWEEN 15000 AND 17000;
Short/Brief Note
Advertisements

Solution


  1. DISTINCT TID
    101
    NULL
    102
    104
    103

  2. TID COUNT(*) MIN(FEES)
    101 2 12000

  3. CNAME
    Digital Marketing
    Mobile Application Development
  4. 15500.00
shaalaa.com
GROUP BY Clause in SQL
  Is there an error in this question or solution?
2022-2023 (March) Sample
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×