Online Quiz

← Back
Get daily current affairs & exam alerts – follow us YouTube WhatsApp Channel Telegram Channel Facebook Page Instagram
Share with friends & study groups
Link to this page from your website / blog (HTML code)
1.  

Directions: The next 6 questions are based on the table LOAN (Rate is in % per annum; NULL = not yet fixed):

LoanID Branch Kind Amount Rate
L1 Salem Home 2500000 8
L2 Erode Gold 150000 9
L3 Salem Gold 90000 NULL
L4 Karur Car 600000 10
L5 Erode Home 1800000 8
L6 Salem Car 450000 NULL
SELECT COUNT(Rate) FROM LOAN; returns:

Correct Answer: E [4]

Explanation:

COUNT(column) skips the 2 NULL rates → 4.

2.  
SELECT AVG(Rate) FROM LOAN; returns:

Correct Answer: C [8.75]

Explanation:

NULLs ignored: (8 + 9 + 10 + 8) ÷ 4 = 35 ÷ 4 = 8.75.

3.  
SELECT Branch, SUM(Amount) FROM LOAN GROUP BY Branch HAVING COUNT(*) >= 2 ORDER BY SUM(Amount) DESC; gives the rows:

Correct Answer: D [Salem 3040000; Erode 1950000]

Explanation:

Salem 3 loans (3040000), Erode 2 (1950000), Karur 1 dropped by HAVING; sorted descending.

4.  
SELECT LoanID FROM LOAN WHERE Rate IS NULL OR Amount BETWEEN 150000 AND 600000 ORDER BY LoanID; returns:

Correct Answer: C [L2, L3, L4, L6]

Explanation:

Rate NULL: L3, L6. BETWEEN (inclusive) 150000–600000: L2, L4, L6 → L2, L3, L4, L6.

5.  
SELECT COUNT(*) FROM LOAN WHERE Kind IN ('Gold', 'Car') AND Branch <> 'Salem'; returns:

Correct Answer: E [2]

Explanation:

Gold/Car loans: L2 Erode, L3 Salem, L4 Karur, L6 Salem → not Salem: L2, L4 = 2.

6.  
If UPDATE LOAN SET Rate = 9 WHERE Rate IS NULL; is run first, what does SELECT AVG(Rate) FROM LOAN; then return (to two decimals)?

Correct Answer: B [8.83]

Explanation:

Rates 8, 9, 9, 10, 8, 9 → 53 ÷ 6 = 8.83.

7.  
SELECT DISTINCT Branch FROM LOAN ORDER BY Branch; returns:

Correct Answer: A [Erode, Karur, Salem]

Explanation:

DISTINCT removes repeats; ORDER BY sorts A→Z: Erode, Karur, Salem.

8.  
A teller must be allowed to read the table ACC but not change it. Which statement should the DBA run?

Correct Answer: D [GRANT SELECT ON ACC TO teller1;]

Explanation:

GRANT SELECT gives read-only permission (DCL); UPDATE would allow changes.

9.  
Consider the following statements about SQL commands:
I. ALTER, DROP and RENAME are DDL commands.
II. ROLLBACK and SAVEPOINT are DCL commands.
III. INSERT, UPDATE and DELETE are DML commands.
Which of the statements given above is/are correct?

Correct Answer: C [Only I and III]

Explanation:

I and III true; II false – ROLLBACK and SAVEPOINT are TCL.

10.  
Match the ACID property with its meaning:
List I: (a) Atomicity; (b) Consistency; (c) Isolation; (d) Durability
List II: (1) all or nothing; (2) valid state to valid state; (3) committed changes survive failures; (4) no interference between concurrent transactions

Correct Answer: E [a-1, b-2, c-4, d-3]

Explanation:

Atomicity all-or-nothing; Consistency valid states; Isolation no interference; Durability survives failures.

11.  
Match the ER symbol with what it represents:
List I: (a) Rectangle; (b) Diamond; (c) Dashed ellipse; (d) Double ellipse
List II: (1) entity set; (2) derived attribute; (3) multi-valued attribute; (4) relationship set

Correct Answer: B [a-1, b-4, c-2, d-3]

Explanation:

Rectangle entity; diamond relationship; dashed ellipse derived; double ellipse multi-valued.

12.  
In a table ORDERS(OrderNo, ItemNo, ItemName, Qty) the primary key is (OrderNo, ItemNo) and ItemName depends only on ItemNo. The table is not in:

Correct Answer: A [2NF, because of a partial dependency]

Explanation:

A non-key attribute depending on part of a composite key = partial dependency → breaks 2NF.

13.  
In a table ACCOUNT(AccNo, BranchCode, BranchCity) with primary key AccNo, BranchCity depends on BranchCode. This is a:

Correct Answer: C [transitive dependency (breaks 3NF)]

Explanation:

AccNo → BranchCode → BranchCity: non-key depends on non-key → 3NF.

14.  
Table R has 7 rows and 4 columns; table S has 5 rows and 3 columns. Their Cartesian product (CROSS JOIN) has:

Correct Answer: D [35 rows and 7 columns]

Explanation:

Rows multiply (7 × 5 = 35); columns add (4 + 3 = 7).

15.  
Consider the following statements:
I. WHERE is applied before GROUP BY, and HAVING after it.
II. An aggregate function such as COUNT(*) can be used directly in a WHERE clause.
III. COUNT(*) counts rows even when some columns contain NULL.
Which of the statements given above is/are correct?

Correct Answer: B [Only I and III]

Explanation:

I true; II false – aggregates belong in HAVING; III true – COUNT(*) counts every row.

📘 IBPS Clerk 2026 – B4 Computer Aptitude (PDF book)
Here you get the answer with a one-line explanation. 690 questions, each with a full step-by-step explanation · shortcuts, tables, trap alerts · Prelims + Mains sectional mocks. All 5 books together: ₹599.
Get the book – ₹149 →
Score: 0 Answered: 0 / 0