LevSelector.com |
SQL_test1.
Below there are 60+ problems (for 3 different databases) with answers.
The material is copied from the SQL Tutor.
Company Database:
Tables: DEPARTMENT (DNAME, DNUMBER, MGR, MGRSTARTDATE) EMPLOYEE (IRD, LNAME, MINIT, FNAME, BDATE, ADDRESS, SEX, SALARY, SUPERVISOR, DNO) DEPT_LOCATIONS (DNUMBER, DLOCATION) PROJECT (PNAME, PNUMBER, PLOCATION, DNUM) WORKS_ON (EIRD, PNO, HOURS) DEPENDENT (EIRD, DEPENDENT_NAME, SEX, BDATE, RELATIONSHIP) |
Movies Database:
Tables: DIRECTOR (NUMBER, LNAME, FNAME, BORN, DIED) MOVIE (NUMBER, TITLE, TYPE, AANOM, AAWON, YEAR, CRITICS, DIRECTOR) STAR (LNAME, FNAME, NUMBER, BORN, DIED,CITY) CUSTOMER (LNAME, FNAME, NUMBER, ADDRESS, RENTALS, BONUS, JDATE) TAPE (CODE, MOVIE, PDATE, TIMES, CUSTOMER, HIREDATE) STARS (MOVIE, STAR, ROLE) |
Registration Database:
Tables: VEHICLE_TYPE (make, model, power, no_pass, cap, cc) VEHICLE (plates, year, eng_no, ch_no, type, make, model) EMPLOYEE (fname, init, lname, IRD, sex, bdate, office, reg_org, sdate) OWNER (dr_lic, IRD, fname, init, lname, address, bdate, sex, emp, phone) OWNS (plates, ownerid, date,drr) COLOR (plates, color) REG_ORG (number, street, st_num. city, manager) FIRST_REG (plates, emp, reg_org, reg_date, country, status, drr, amount) REGISTRATION (PLATES, emp, reg_org, reg_date, amount) |