Професионална програма
+ Нов въпрос
TeodoraL.Kostadinova avatar TeodoraL.Kostadinova 2 Точки

MySQL-Basics-Exercises -Database Programmability - Exercise 9. People with Balance Higher Than

По условие на задачата трябва да сортираме по first_name, last_name  и account id, но всъчщност judge иска да е само по id... това след хиляди теста минава със 100 т.


CREATE PROCEDURE usp_get_holders_with_balance_higher_than(amount DECIMAL (19,4))
SELECT first_name, last_name FROM
(SELECT a.id, first_name, last_name, sum(a.balance) AS total FROM account_holders AS ah
JOIN accounts a
ON a.account_holder_id=ah.id
GROUP BY ah.first_name,ah.last_name)
AS tb
WHERE tb.total>amount
ORDER BY  tb.id;


Databases Basics
sukalu88 avatar sukalu88 46 Точки

Thank you for your post. I have read through some similar topics! However, your post gave me a very special impression, unlike other articles. I hope you continue to have valuable articles like these or more to share with everyone! us map