Professional Documents
Culture Documents
Ie323 Sample Major 1 Exam
Ie323 Sample Major 1 Exam
Computer No :_____________________________
Attempt all the questions.
Please Run the SQL file provided “FE.SQL”. It will create all the tables and insert all the data.
1) Create the following GYM information system.
a) Member323
MNO, MNAME, DOB, M_HEAD_NO, Gender , EARNED_POINTS
b) COACH323
CNO, CNAME, CTYPE, PRICE_PER_HOUR, C_HEAD_NO
c) Booking323
MNO, CNO, RESERVE_DATE, RESERVE_ TIME , NO_OF_HOURS
d) MLEVEL323
MSTATUS , LPOINT , HOINT
Tables Data
MEMBER323
MN
O MNAME DOB M_HEAD_NO GENDER EARNED_POINTS
101 FAISAL 12-Jun-91 103 MALE 900
102 IRUM 9-Jan-84 103 FEMALE 1800
103 MALBARI 18-Feb-85 MALE 2700
104 BELADI 21-Mar-80 103 MALE 1400
COACH323
BOOKING323
MN
O CNO RESERVE_DATE RESERVE_TIME NO_OF_HOURS
Page | 1 of 5
IE 323
MLEVEL323
LPOIN
MSTATUS T HPOINT
YELLOW 0 999
Page | 2 of 5
IE 323
2) Display the coach with HIGHEST total payment (Total payment is calculated based on
NO_OF_HOUR and PRICE_PER_HOUR). (2.5 marks)
CNAME HIGHEST_TOTAL_COACH_PAYMENT
HISHAMM 1750
3) Display all the Members who were born on the same day of the week as his MEMBER HEAD was
born and display their AGE in years using graphic representation every 5 years represent one ‘#’
(round the age). (3 MARKS)
MNAM
E M_AGE_IN_YEAR M_HEAD_NAM HEAD_AGE_IN_YEAR
IRUM ####### MALBARI #######
Page | 3 of 5
IE 323
4) Increase the price_per_hour for each coach as PER TOTAL AMOUNT . If total amount is between 0
to 899 increase 30% and if between 900 and 1799, then increase 50% rest all increase 60%. (3 marks)
TOTAL_AMOUNT_FOR_EACH_CO PRICE_PER_HOU NEW_PRICE_PER_HO
CNAME AH R UR
REHAN 1200 200 300
ATEF 360 120 156
HISHAM
M 1750 250 375
AMMAR 900 150 225
5. Find the SECOND occurrence of letter ‘M’ in CNAME , and change second M to W.
Display only those persons who have two MM’s in their names. (4 MARKS)
CNAME NEW_CNAME
AMMAR AMWAR
HISHAM
M HISHAMW
Page | 4 of 5
IE 323
Page | 5 of 5
IE 323
Page | 6 of 5