Re: RE:Re: A complex SQL query
От | Victor Yegorov |
---|---|
Тема | Re: RE:Re: A complex SQL query |
Дата | |
Msg-id | CAGnEboib=bKnJsW9Ho_A0-fBoCzb2cxQp+oXHNxmoBrro+dS3w@mail.gmail.com обсуждение исходный текст |
Ответ на | RE:RE:Re: A complex SQL query ("jj08" <jj08@drivehq.com>) |
Список | pgsql-sql |
To Janis or other members of the forum:
My sample table contains other columns as well.
One of the columns that I did not include in my first message is "position".
The last table has been modified as follows:
+--------+----------+------------+------------------------+
| usr_id | employer | position + start_date | end_date |
+--------+----------+------------+------------------------+
| A | Goo | CTO | | 201904 |
| A | Micro | Mgr | 201704 | 201903 |
| B | Micro | Engg_Mgr | 201706 | - |
| B | Goo | Researcher | 201012 | 201705 |
| B | Micro | Postdoc | 201001 | 201011 |
+--------+----------+------------+------------------------+
*
FROM employment
WHERE employer='Micro'
ORDER BY usr_id, start_date DESC;
В списке pgsql-sql по дате отправления: