• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

Show Last 5 Closed Tickets

Hello Experts,

I have the following table with the values listed below. I need to display the Last 5 Closed Tickets based on the value "tkt_cmpl_dt" which has a DateTime that the ticket was closed.

Tickets Table:
  tkt_id  int  PK
  tkt_cmpl_dt  DateTime
1 Solution
Steve WalesSenior Database AdministratorCommented:
This will get the answer:

select top 5 tkt_id, tkt_cmpl_dt from tickets order by tkt_cmpl_dt desc

Open in new window

Maybe something along the lines of:
SELECT TOP 5 * FROM tickets_table ORDER BY tkt_cmpl_dt DESC;
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now