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

  • Home
  • SEARCH
  • 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 8197697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:47:40+00:00 2026-06-07T05:47:40+00:00

I have data in my database ID UserID CourseName Grade 1 8 CourseA 75

  • 0

I have data in my database

ID    UserID   CourseName   Grade                                  
 1      8        CourseA      75
 2      8        CourseA      102 
 3      8        CourseA      115
 4      8        CourseA      111
 5      8        CourseA      112
 6      8        CourseB      60
 7      8        CourseB      45
 8      8        CourseB      58
 9      8        CourseB      60
 10     8        CourseB      74
 11     8        CourseC      130
 12     8        CourseC      140
 13     8        CourseC      133 
 14     8        CourseC      135

I need the last updated grade for a single course like

`8     CourseA   112    
 8     CourseB   74
 8     CourseC   135`

Could anyone suggest me an sql query for this.

  • 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-06-07T05:47:41+00:00Added an answer on June 7, 2026 at 5:47 am

    Alright, updating my answer:

    Got it:

    SELECT UserID, CourseName, Grade
    FROM yourtable
    WHERE UserID = '8'
    AND ID
    IN (
        SELECT MAX( ID ) 
        FROM yourtable
        GROUP BY CourseName
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database table (called Info) that stores [Data], [fkID], [UserID], [Timestamp]. [Data]
I have another problem, I have a database with UserID's with data. I want
I have a data in my database userid module course total 8 Biophysics A
I have some data in a database that I need represented in an XML
I have data in an SQL Server 2005 database which I need to copy
I have taken char data into database into array. now i want to convert
I have taken the data from database into array now I want it to
I have live data in a database i want to tweet data in real
I have data in this format coming from a database... BUS 101S Business and
I have some data in the database, in this format: Description~Level||Description~Level|| I want to

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.