From 4f2c23b85ce509a639e2473b32bf3e2a08afbb95 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Fri, 8 Nov 2024 22:32:59 +0530 Subject: [PATCH] Fixed query 1 and added missing query 2. --- Practical/Practical Exam/SQL/S1 - SQL Queries.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Practical/Practical Exam/SQL/S1 - SQL Queries.md b/Practical/Practical Exam/SQL/S1 - SQL Queries.md index dd94542..65e45a7 100644 --- a/Practical/Practical Exam/SQL/S1 - SQL Queries.md +++ b/Practical/Practical Exam/SQL/S1 - SQL Queries.md @@ -129,12 +129,13 @@ INSERT INTO Borrower VALUES 1. Find the names of all branches in loan relation. ```sql -SELECT branch_name FROM Loan WHERE amount > 12000; +SELECT DISTINCT branch_name FROM Loan; ``` 2. Find all loan numbers for loans made at ‘Wadia College’ Branch with loan amount > 12000. ```sql +SELECT loan_no FROM Loan WHERE branch_name = 'Wadia College' AND amount > 12000; ``` @@ -155,5 +156,3 @@ SELECT cust_name FROM Borrower INNER JOIN Loan on Borrower.loan_no = Loan.loan_n SELECT DISTINCT branch_city FROM Branch; ``` - ----