English

Suman has created a table named WORKER with a set of records to maintain the data of the construction sites, which consists of WID, WNAME, WAGE, HOURS, TYPE, and SITEID. After creating the table, - Computer Science (Python)

Advertisements
Advertisements

Question

Suman has created a table named WORKER with a set of records to maintain the data of the construction sites, which consists of WID, WNAME, WAGE, HOURS, TYPE, and SITEID. After creating the table, she entered data in it, which is as follows:

WID WNAME WAGE HOURS TYPE SITEID
W01 Ahmed J 1500 200 Unskilled 103
W11 Naveen S 520 100 Skilled 101
W02 Jacob B 780 95 Unskilled 101
W15 Nihal K 560 110 Semiskilled NULL
W10 Anju S 1200 130 Skilled 103

Considering the above given table WORKER, write the output on execution of the following SQL commands:

  1. SELECT WNAME, WAGE*HOURS FROM WORKER WHERE SITEID = 103;
  2. SELECT COUNT (DISTINCT TYPE) FROM WORKER;
  3. SELECT MAX(WAGE), MIN(WAGE), TYPE FROM WORKER GROUP BY TYРЕ;
  4. SELECT WNAME, SITEID FROM WORKER WHERE TYPE="Unskilled" ORDER BY HOURS;
Code Writing
Advertisements

Solution

  1. WNAMЕ     WAGE * HOURS
    Ahmed J     300000
    Anju S      156000
  2. Count(Distinct(Type))
            3
  3. Max(Wage)  Min(Wage)  Type
    1500       780        Unskilled
    1200       520        Skilled
    560        560        SemiSkilled
  4. WNAMЕ      SITEID
    Jacob B    101
    Ahmed J    103
shaalaa.com
  Is there an error in this question or solution?
2024-2025 (March) Set 4

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×