Skip to content
Question 62 of 95

Q.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

(a) Based on the data given above, answer the following questions :
(i) Write the SQL statement to display the names and wages of those workers whose wages are between 800 and 1500.
(ii) Write the SQL statement to display the record of workers whose SITEID is not known.
(iii) Write the SQL statement to display WNAME, WAGE and HOURS of all those workers whose TYPE is 'Skilled'.
(iv) Write the SQL statement to change the WAGE to 1200 of the workers where the TYPE is "Semiskilled"
(OR)
(b) Considering the above given table WORKER, write the output on execution of the following SQL commands:
(i) SELECT WNAME, WAGE*HOURS FROM WORKER WHERE SITEID = 103;
(ii) SELECT COUNT(DISTINCT TYPE) FROM WORKER ;
(iii) SELECT MAX(WAGE), MIN(WAGE), TYPE FROM WORKER GROUP BY TYPE;
(iv) SELECT WNAME, SITEID FROM WORKER WHERE TYPE="Unskilled" ORDER BY HOURS;
Uttarakhand UbseCBSE Class XII Board 2025Subjective· 4mImportance★★★★★
65% · 62/95 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Part (a): four SQL statements — BETWEEN range, IS NULL, TYPE filter, and an UPDATE.

Part (b): outputs — (i) 300000 & 156000; (ii) 3; (iii) per-type max/min wages; (iv) Jacob B/101 then Ahmed J/103.

Part (a)

(i) Wages between 800 and 1500 (inclusive) — BETWEEN is inclusive of both bounds:

SELECT WNAME, WAGE FROM WORKER WHERE WAGE BETWEEN 800 AND 1500;

(ii) "Not known" means the value is NULL; NULL is tested with IS NULL, never =:

SELECT * FROM WORKER WHERE SITEID IS NULL;

(iii) Skilled workers only:

SELECT WNAME, WAGE, HOURS FROM WORKER WHERE TYPE = 'Skilled';

(iv) Modify existing rows with UPDATE ... SET ... WHERE:

UPDATE WORKER SET WAGE = 1200 WHERE TYPE = 'Semiskilled'; …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.