Home > database >  A simple SQL, can't write it out
A simple SQL, can't write it out

Time:09-18

C_Id c_NO c_ServiceType c_PlanDate c_CompleteDate
18403 RP2020090179 maintenance 2020-09-16 00:00:00. 000 NULL
18404 2020-09-16 00:00:00 RP2020090180 debugging. 000 2020-09-16 17:58:58. 683
18406 2020-09-16 00:00:00 RP2020090182 cleaning. 000 2020-09-16 22:21:09. 067
18349 RP2020090125 security 2020-09-16 00:00:00. 000 2020-09-16 12:36:58. 727
18402 RP2020090178 maintenance 2020-09-16 00:00:00. 000 NULL
18405 RP2020090181 installed 12:12:58. 2020-09-16 150 2020-09-16 16:22:05. 657
18407 RP2020090183 installed 2020-09-16 12:39:26. 313 NULL

Want to get the result 2 installation plan, complete 1
Maintenance plan 2, complete 0
Cleaning plan 1, complete 1
Debugging plan 1, complete 1
Security plan 1, complete 1

How do you write Sql? How or database design???
  • Related