מידע

יוצרים Quentin Cappart
מועד הגשה אין מועד הגשה
מגבלת הגשות אין הגבלה

כניסה

Lecture de requêtes SQL (conditions plus complexes)

Traduisez le plus précisément possible les requêtes SQL suivantes. N'hésitez pas à exécuter ces requêtes dans SQLite pour vérifier votre compréhension.


שאלה 1:
select name
from student
where dept_name = 'Biology'
      and tot_cred between 30 and 90;
שאלה 2:
select course_id
from course
where dept_name = 'Physics'
      or credits = 4;
שאלה 3:
select name
from instructor
where salary > 50000
      and salary < 80000;
שאלה 4:
select dept_name
from department
where budget < 2000000
      or building = 'Watson';
שאלה 5:
select ID
from student
where dept_name = 'Biology'
      and (tot_cred < 30 or tot_cred > 100);
שאלה 6:
select title
from course
where credits between 2 and 4
      and dept_name = 'Comp. Sci.';
שאלה 7:
select building
from classroom
where capacity >= 50
      and capacity <= 150;
שאלה 8:
select time_slot_id
from time_slot
where day = 'M' --- Lundi (Monday)
    and start_hr >= 8
    and start_hr <= 12;
שאלה 9:
select name
from student
where (dept_name = 'Physics'
      or dept_name = 'Chemistry')
      and tot_cred > 60;
שאלה 10:
select name
from instructor
where (salary < 60000 or salary > 100000)
      and dept_name = 'Biology';