akbar ansari

akbar ansari

  • 1.7k
  • 64
  • 2.1k

SQL Pivot Table Query

Mar 29 2023 1:29 PM
Date TYPE TIME
01-01-2020 A 01:20
01-01-2020 A 12:30
01-01-2020 B 18:30
02-01-2020 A 10:01
02-01-2020 B 10:20
03-01-2020 A 11:01
03-01-2020 B 11:10
04-01-2020 A 11:21
04-01-2020 B 12:22
04-01-2020 B 18:21
04-01-2020  A  09:00
till month end more TYPE (A,B)... more times....(different times)

How can i present table in

GET only TYPE  value A is MIN value and TYPE B is Max value with this formate

TYPE 01-01-2020 02-01-2020 03-01-2020 04-01-2020 05-01-2020 06-01-2020 07-01-2020
A 12:30 10:01    11:21

 

 

 

B 18:30 10:20    18:21

 

 

 


Answers (2)