SELECT MAX( col )
FROM table
WHERE col < ( SELECT MAX( col )
FROM table )
More Related Contents:
- Refactor a PL/pgSQL function to return the output of various SELECT queries
- SQL – HAVING vs. WHERE
- Can I use CASE statement in a JOIN condition?
- sql server 2008 management studio not checking the syntax of my query
- dplyr left_join by less than, greater than condition
- How do I write a full outer join query in access
- Is there an Oracle SQL query that aggregates multiple rows into one row? [duplicate]
- Storing money in a decimal column – what precision and scale? [closed]
- Is there something like a zip() function in PostgreSQL that combines two arrays?
- Conditional sum in Group By query MSSQL
- Natural join in SQL Server
- Pivot using SQL Server 2000
- Transfer data from one database to another database
- How to update and order by using ms sql
- What does the “@” symbol do in SQL?
- Using Excel VBA to run SQL query
- Procedure or function !!! has too many arguments specified
- MySQL select where column is not empty
- Is it possible to have a default parameter for a mysql stored procedure?
- Postgres – Function to return the intersection of 2 ARRAYs?
- Split string and take last element
- Can I set ignore_dup_key on for a primary key?
- Built-in function to capitalise the first letter of each word
- BigQuery SQL for 28-day sliding window aggregate (without writing 28 lines of SQL)
- Convert String to Date in MS Access Query
- Difference between FULL JOIN & INNER JOIN
- Update multiple rows with one query?
- Is this a good way to model address information in a relational database?
- Using django how can I combine two queries from separate models into one query?
- Previous Monday & previous Sunday’s date based on today’s date