New answers tagged table
1
vote
Accepted
Selecting second highest value using two SQL queries returns different results
These queries are fundamentally different. One has a scalar aggregation, and one does not.
This query is selecting the first row which is not the maximum. If there is no row then no results will be ...
- 8,860
Top 50 recent answers are included
Related Tags
table × 523mysql × 162
database-design × 123
sql-server × 109
postgresql × 56
oracle × 40
join × 22
query × 21
update × 21
schema × 19
foreign-key × 19
partitioning × 17
index × 14
select × 13
trigger × 12
insert × 12
performance × 11
erd × 11
mariadb × 10
mysql-5.6 × 10
sql-server-2012 × 9
sql-server-2008-r2 × 9
t-sql × 9
innodb × 9
normalization × 9