public inbox for [email protected]
help / color / mirror / Atom feedFrom: Stöcker, Martin <[email protected]>
To: Shaozhong SHI <[email protected]>
To: pgsql-sql <[email protected]>
Subject: AW: Change detection
Date: Fri, 9 Dec 2022 13:02:10 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+i5JwZ+XmOF6P4Lo=UTVUJBSQN4EyQL-fe7t4XTLPB9bwq9aQ@mail.gmail.com>
References: <CA+i5JwZ+XmOF6P4Lo=UTVUJBSQN4EyQL-fe7t4XTLPB9bwq9aQ@mail.gmail.com>
select Name, Department, min(year), max(year) from data group by Name, Department
The meaning of Staff_ID is obscure because it’s not unique.
Mit freundlichen Grüßen
Martin Stöcker
-----------------------------------------
ETL Datenservice GmbH
Widdersdorfer Str. 415 | D-50933 Köln
Telefon: +49(0)2219544010
Fax: +49(0)2219544015
Email: [email protected]
[etlds]
ETL Datenservice GmbH
Widdersdorfer Str. 415 · 50933 Köln
Geschäftsführer: Dr. Dirk Goldner, ppa. Melanie Lillich, ppa. Udo Heuschmann
Amtsgericht Köln · HRB 75439 · USt.-Id: DE 122 805 685
www.etl-datenservice.de<http://www.etl-datenservice.de;
Email: [email protected]<mailto:[email protected]>
Von: Shaozhong SHI <[email protected]>
Gesendet: Freitag, 9. Dezember 2022 13:55
An: pgsql-sql <[email protected]>
Betreff: Change detection
A record shows all staff member worked in different departments.
For instance, Tom was in sales for several years and got promoted to management. How to detect the time of this change?
Data
Staff_ID Name Department Year
1 Tom Sales 1990
2 Tom Sales 1991
3 Tom Sales 1991
4 Tom Management 1992
4 Tom Management 1992
Regards,
David
Attachments:
[image/png] image001.png (1.9K, 3-image001.png)
download | view image
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: AW: Change detection
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox