TGViewer
SQL задачи SQL задачи @sqlquestions · 9.98K subscribers
Post #758 6.7K
Решение к #Задача15:

SELECT
e.last_name,
e.first_name,
e.store_id as store_id_employee,
r.store_id as store_id_rank,
r.rank_id,
r.name as rank_name
FROM employee e
JOIN ranks r
ON r.store_id = e.store_id
OR (r.rank_id = e.rank_id AND r.store_id != e.store_id)
ORDER BY e.last_name, e.first_name, r.store_id, r.rank_id

#задача
More from @sqlquestions
  1. Sep 23, 2026Задачка по нашей базе данных, которая находится в шапке канала. Код генерации базы данных…
  2. Sep 9, 2026Шпаргалка. 100 SQL комманд
  3. Aug 18, 2026Post #1551
  4. Aug 18, 2026Post #1549
  5. Aug 10, 2026Post #1548
  6. Aug 3, 2026Post #1547
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →