Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE FUNCTION dbo.najwiecej_spraw () RETURNS VARCHAR(100)
- AS
- BEGIN
- RETURN (SELECT TOP 1 se.imie, se.nazwisko, COUNT(sp.id_sprawa) AS ilosc_spraw FROM
- sedzia se INNER JOIN sprawa se ON se.id_sedzia=sp.id_sedzia
- GROUP BY se.id_sedzia
- ORDER BY ilosc_spraw ASC)
- END
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement