What is the SQL statement if you want to retrieve the following data?

Asked 1 years ago, Updated 1 years ago, 51 views

I am not good at sql, so please let me know.

"I would like to extract ""Contractor ID_PK"" and ""Regional Number"" from the following contract information TBL."
The extraction conditions are a list of non-overlapping county numbers for each contractor ID.
Thank you for your cooperation.

◾ 情報Contract Information TBL

Contractor ID_PK Contract Number_PK Affiliate Country Number...
aaa00101
aaa00201
aaa00302
bbb00101
bbb00202
bbb00302
ccc00101
ccc00201
ccc00301

Contractor ID Country Number
aaa01
aaa02
bbb01
bbb02
ccc01

sql

2022-09-30 21:35

1 Answers

SELECT DISTINCT Contractor ID_PK, Affiliate country number FROM contract information TBL

I see. DISTINCT removes duplicate lines from the results.


2022-09-30 21:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.