Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql select row with min date

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

PREVIOUS NEXT
Code Example
Sql :: python dictionary to sql update 
Sql :: sql query rename table 
Sql :: importing excel data into sql server 
Sql :: delete data from database sqlite android 
Sql :: export mysql db using command line 
Sql :: null value in column violates not-null constraint 
Sql :: mysql set boolean default value 
Sql :: update foreign key value in mysql 
Sql :: mysql find duplicates 
Sql :: nosql vs sql 
Sql :: sample in sql 
Sql :: duplicate key value violates unique constraint in postgresql 
Sql :: pl sql 
Sql :: sql greater than 
Sql :: oracle current session details 
Sql :: laravel eloquent get generated sql 
Sql :: mysqldump database 
Sql :: sql column to row 
Sql :: print hello world in sql 
Sql :: how to create a table structure from another table in mysql 
Sql :: count the table indatabase 
Sql :: sql left join 
Sql :: drop database using terminal postgres 
Sql :: select all tables linked server sql 
Sql :: access no password in mysql mamp 
Sql :: test sql query 
Sql :: delete from table sql 
Sql :: sql update record 
Sql :: mysql concat and use as where column 
Sql :: install mysql in ubuntu 18.04 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =