SQL神到! Just kidding. I’m going to use English just in case other learners can take something from it.
Translation:
Two tables: Customer Basic Data (MSE04
) & User Account Basic Data (SYS03
)
MSE04
Customer Basic Information columns:
data_id
customer_id
customer_name
is_valid
data_creator_id
data_creation_time
data_changer_id
SYS03
User Account Basic Data Table columns:
data_id
account_type
login_id
account_name
login_password
is_valid
login_barcode
Question:
Please find out valid customers and display the login ID and account name of the creator of the data. Customer numbers are sorted in ascending order.
My answer:
SELECT login_id, account_name
FROM MSE04
JOIN SYS03
ON MSE04.data_id = SYS03.data_id
WHERE is_valid = 'true'
ORDER BY customer_id ASC;
Fellow SQL friends, please chime in if you have another answer!