diff --git a/files_for_lab/lab1_bank-kdr.sqbpro b/files_for_lab/lab1_bank-kdr.sqbpro new file mode 100644 index 0000000..80fdc1f --- /dev/null +++ b/files_for_lab/lab1_bank-kdr.sqbpro @@ -0,0 +1,69 @@ +SELECT * +From account +Where district_id = 1 +LIMIT 5; +SELECT * +FROM client +WHERE district_id = 72 +ORDER BY district_id DESC +LIMIT 1; +SELECT * +FROM loan +ORDER BY amount ASC +LIMIT 3;SELECT DISTINCT status +FROM loan +ORDER BY statusSELECT loan_id +FROM loan +ORDER BY payments DESC +LIMIT 1;SELECT account_id, amount +FROM loan +ORDER BY account_id ASC +LIMIT 5; + SELECT account_id +FROM loan +WHERE duration = 60 +ORDER BY amount ASC +LIMIT 5;SELECT DISTINCT k_symbol +FROM 'order' + +SELECT order_id +FROM 'order' +WHERE account_id = 34 +SELECT account_id +from 'order' +where order_id between 29540 and 29560; +SELECT amount +From "order" +Where account_to = 30067122SELECT trans_id, date, type, amount +From trans +Where account_id = 793 +Order by date DESC +Limit 10SELECT district_id, COUNT(*) AS clients +from client +where district_id <= 10 +Group by district_id +order by district_id ASC; +SELECT type, COUNT(*) AS card_count +FROM card +GROUP BY type +ORDER BY card_count DESC; +SELECT account_id, SUM(amount) AS total_amount +FROM loan +GROUP BY account_id +ORDER BY total_amount DESC +LIMIT 10; +SELECT date, COUNT(loan_id) AS number_of_loans +FROM loan +WHERE date <= 930907 +order BY date DESC; +SELECT duration, COUNT(loan_id) AS number_of_loans +FROM loan +WHERE DATE >= '971201' AND DATE < '971231' +GROUP BY duration +ORDER BY DATE ASC, duration ASC; +SELECT account_id, type, SUM(amount) AS total_amount +FROM trans +WHERE account_id = 396 +GROUP BY account_id, type +ORDER BY type ASC; + diff --git a/files_for_lab/lab1_bank.sqlite b/files_for_lab/lab1_bank.sqlite deleted file mode 100644 index 9f195f1..0000000 Binary files a/files_for_lab/lab1_bank.sqlite and /dev/null differ