Question : I’m using the following code to pull our top 20 queries (ordered by CPU): SELECT TOP 20 qs.sql_handle […]
Tag: top
Access not properly translating TOP predicate to ODBC/Oracle SQL
Question : I have a MS Access query that is based on a linked ODBC table (Oracle). The DDL for […]
How to select TOP 1 value from each column where value is not null
Question : I am trying to select many columns from a table where there can be multiple rows with the […]
DISTINCT on one column and return TOP rows
Question : How do you query for three unique customers with the largest Purchase_Cost? I want to apply the DISTINCT […]
Top 10 each year
Question : I need to write a query to show the number of tracks sold per artist per year for […]
Postgres top-k with ties
Question : Assume I have the following DB table with 3 integer fields. A | B | C 1 | […]
Performance Order By large table with Join
Question : Hello I have a table with 206,902 records and I am struggling to improve my query: SELECT TOP […]
Top N earliest punched in Employees across departments in a month
Question : Find two of the earliest punched in Employees across departments in a month The dataset. Id EmpName EmpPunchInTime […]
How to select distinct TOP but group by column
Question : I have a result set of 500 rows, but this are for 100 invoice. I need only the […]
Using TOP in INSERT INTO statement
Question : I am reading a tutorial about TOP keyword in T-SQL. But I don’t really understand the examples given […]
- 1
- 2