Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7559895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:45:19+00:00 2026-05-30T12:45:19+00:00

I have a table, contains a list of tasks: ID TaskName Date ———————————- 1

  • 0

I have a table, contains a list of tasks:

ID      TaskName       Date
----------------------------------
1       Task1          2010-11-23
2       Task2          2011-12-01
3       Task1          2012-02-01
4       Task3          2008-01-09
5       Task2          2007-03-09
6       Task3          2000-01-01

how to create a view contain task with its lastest perform date?

e.g result from the above table should be:

id  taskname  date
------------------------
3   Task1     2012-02-01
2   Task2     2011-12-01
4   Task3     2008-01-09
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:45:21+00:00Added an answer on May 30, 2026 at 12:45 pm
    SELECT
      ID,
      TaskName,
      Date
    FROM
    (
      select 
        ID,
        ROW_NUMBER() OVER (PARTITION BY TaskName ORDER BY Date DESC) Ordinal,
        TaskName,
        Date
      FROM YourTable
    ) t
    WHERE Ordinal = 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table which contains a list of ID's (int) and the date
I have a table that contains a list of tasks; TableName: Tasks. Fields: (ID
I have a table which contains a list of products for a company. They
Here is my situation: I have one table that contains a list of drugs
I have a simple MySQL table thats contains a list of categories, level is
I have a DB table that contains a comma separated list of ID's (ints)
I have a table which contains my ads that can be searched in sql-server-2008.
I have a mysql legacy table which contains an client identifier and a list
I have a table that contains a list of machines that are loaned out
I have a table which contains a list of categories and and another table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.