diff --git a/solutions.sql b/solutions.sql new file mode 100644 index 0000000..2eede84 --- /dev/null +++ b/solutions.sql @@ -0,0 +1,18 @@ +-- SELECT FROM account WHERE district_id == 1 ORDER BY account_id ASC LIMIT 5 +-- SELECT * FROM client WHERE district_id == 72 ORDER BY client_id DESC LIMIT 1 +-- SELECT * FROM loan ORDER BY amount ASC LIMIT 3 +-- SELECT DISTINCT status FROM loan ORDER BY status +-- SELECT loan_id FROM loan ORDER BY amount DESC LIMIT 1 +-- SELECT account_id, amount FROM loan ORDER BY account_id LIMIT 5 +-- SELECT account_id FROM loan WHERE duration == 60 ORDER BY amount ASC +-- SELECT DISTINCT k_symbol FROM "order" +-- SELECT order_id FROM "order" WHERE account_id == 34 +-- SELECT DISTINCT account_id FROM "order" WHERE order_id >= 29540 and order_id <= 29560 +-- SELECT amount FROM "order" WHERE account_to == "30067122" +-- SELECT trans_id, "date", type, amount FROM trans WHERE account_id == "793" ORDER BY "date" LIMIT 10 +-- SELECT district_id, COUNT(client_id) FROM client WHERE district_id < 10 GROUP BY district_id ORDER BY district_id ASC +-- SELECT type, COUNT(card_id) FROM card GROUP BY type ORDER BY COUNT(card_id) DESC +-- SELECT account_id, amount FROM loan GROUP BY account_id ORDER BY sum(amount) DESC LIMIT 10 +-- SELECT "date", count(loan_id) FROM loan WHERE "date" > "930907" GROUP BY "date" ORDER BY "date" DESC +-- SELECT "date", duration, count(loan_id) FROM loan WHERE "date" LIKE "9712%" GROUP BY "date", duration ORDER BY "date", duration ASC +-- SELECT account_id, type, sum(amount) FROM trans WHERE account_id = 396 GROUP BY type ORDER BY type ASC \ No newline at end of file