QuestionQ60

VerifiedDesign and develop database solutions

You have an Azure SQL database containing the dbo.SupportTickets table. dbo.SupportTickets has a JSON column named Payload and a datetime column named CreatedAt.

Generate a report for the last seven days that meets the following requirements:

  • Return exactly one row for each customer per day.
  • For each customer and day, return the earliest ticket.
  • Include the customer ID stored in Payload.

How should you complete the Transact-SQL query?

Community Discussion

No comments yet. Be the first to start the discussion!