Q31. LastName alphabetically between "Brooks" and "Gray"?
To select records alphabetically between two string boundaries, use the `BETWEEN` operator: ```sql SELECT * FROM Customers WHERE LastName BETWEEN 'Brooks' AND 'Gray' ORDE...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (118 available).
To select records alphabetically between two string boundaries, use the `BETWEEN` operator: ```sql SELECT * FROM Customers WHERE LastName BETWEEN 'Brooks' AND 'Gray' ORDE...
Checks if a value matches any in a list. It's a shorthand for multiple ORs and often more readable. ```sql -- These are equivalent: WHERE state IN ('CA', 'NY', 'TX') WHER...
Converts to uppercase. `LOWER` to lowercase. `INITCAP` (Oracle/PostgreSQL) capitalizes first letter of each word. ```sql SELECT UPPER('hello'); -- HELLO ```
To round a numeric value up to the next nearest integer, use the **`CEIL()`** (or **`CEILING()`**) function: ```sql SELECT CEIL(25.01); -- Returns 26 SELECT CEIL(25.00); ...
In MySQL, you retrieve the current date (year, month, day) without the time component using **`CURDATE()`** or **`CURRENT_DATE`**: ```sql SELECT CURDATE(); -- Example: '2...
The keyword and aggregate function used to retrieve the maximum value of a column is **`MAX()`**: ```sql SELECT MAX(salary) AS highest_salary FROM employees; ``` ### With...
`COUNT()`. `COUNT(*)` counts rows. `COUNT(column)` counts non-NULL values. ```sql SELECT COUNT(*) FROM orders; -- Total orders SELECT COUNT(shipped_date) FROM orders; -- ...
**Aggregate functions** perform a computation on a set of values across multiple rows and return a single summarizing value: ### Core Standard Aggregate Functions: 1. **`...
To return the total count of rows in the `Customers` table, use **`COUNT(*)`**: ```sql SELECT COUNT(*) AS total_customers FROM Customers; ``` ### `COUNT(*)` vs `COUNT(col...
In the SQL `ORDER BY` clause, sorting direction is controlled by two keywords: 1. **`ASC` (Ascending)**: Sorts from lowest to highest (1 to 9, A to Z, oldest date to newe...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.