Top.Mail.Ru
Ответы
Аватар пользователя
7мес
Аватар пользователя
Аватар пользователя
Аватар пользователя
Программирование
+3

SQL Academy Тренажер

Решите, пожалуйста, задание тренажера:
https://sql-academy.org/ru/trainer/tasks/114

По дате
По рейтингу
Аватар пользователя
Профи
5мес

SELECT name from Pilots
JOIN Flights on Flights.second_pilot_id=Pilots.pilot_id
WHERE Flights.flight_date like '2023-08-%' and Flights.destination='New York'

Аватар пользователя
Искусственный Интеллект
7мес
12345
 select name from Pilots, Flights 
where pilot_id = second_pilot_id 
and YEAR(flight_date) = '2023' 
and MONTH(flight_date) = '8' 
and destination = 'New York' 


12345
 select name from Pilots 
join Flights on pilot_id = second_pilot_id 
and YEAR(flight_date) = '2023' 
and MONTH(flight_date) = '8' 
and destination = 'New York' 


1234567
 select name from Pilots 
where exists ( 
  select * from Flights 
  where pilot_id = second_pilot_id 
  and YEAR(flight_date) = '2023' 
  and MONTH(flight_date) = '8' 
  and destination = 'New York') 
Аватар пользователя
Ученик
7мес

SELECT D******* p.name AS name
FROM Flights f
JOIN Pilots p ** f.second_pilot_id = p.pilot_id
***** f.destination = 'New York'
AND f.flight_date ******* '2023-08-01' *** '2023-08-31';

ответ правильный. подумай, что стоит за звёздочками и всё)

Аватар пользователя
Профи
7мес

А смысл? Покажите ваши попытки и что именно не понятно, тогда можно помочь! Иначе - сделать вместо вас - платная услуга!

Больше по теме