Files
ITMO/task7.sql
T
LeterZP f86f7e02f5 Squashed 'DB/DBLab2/' content from commit 5451b82
git-subtree-dir: DB/DBLab2
git-subtree-split: 5451b828cd3210a475fde8e575ae5f94bdd4fdfe
2026-04-06 00:33:38 +03:00

8 lines
354 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SELECT ФАМИЛИЯ, ИМЯ, ОТЧЕСТВО, ДАТА_РОЖДЕНИЯ FROM Н_ЛЮДИ
JOIN (
SELECT ФАМИЛИЯ ФАМ, ДАТА_РОЖДЕНИЯ ДАТА, COUNT(ДАТА_РОЖДЕНИЯ) FROM Н_ЛЮДИ
GROUP BY ФАМ, ДАТА
) ON ФАМ = ФАМИЛИЯ AND ДАТА = ДАТА_РОЖДЕНИЯ
WHERE count = 1
ORDER BY ФАМИЛИЯ;