Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql select min row

SELECT t1.*
FROM employees t1
INNER JOIN (
    SELECT id, min(salary) AS salary FROM employees GROUP BY id
) t2 ON t1.id = t2.id AND t1.salary = t2.salary;
Comment

PREVIOUS NEXT
Code Example
Sql :: how to find average in sql 
Sql :: mysql function variable 
Sql :: how to display value of variable in mysql 
Sql :: mysql create table from select statement 
Sql :: all_dependencies 
Sql :: insert into values select 
Sql :: postgres week number 
Sql :: delete row by id mysql 
Sql :: how to select random rows from table 
Sql :: sqlalchemy empty table 
Sql :: df to sql pandas sql achemy 
Sql :: mysql import from sql file 
Sql :: odd record sql query 
Sql :: lower case in sql 
Sql :: mariadb cast to int 
Sql :: oracle nvl2 
Sql :: mysql not equal 
Sql :: create table mysql integer NOT null 
Sql :: how to create a table structure from another table in mysql 
Sql :: t-sql check if data exists 
Sql :: tablas bootstrap responsive sql server para datos vivos 
Sql :: oracle group 
Sql :: truncate table in sql 
Sql :: sql update 
Sql :: alter column to not null with default value sql server 
Sql :: mysql datetime format 
Sql :: difference between normalization and denormalization 
Sql :: how covert into int in maria db 
Sql :: sql pivot 
Sql :: sql remove duplicate 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =