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 8540239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:33:07+00:00 2026-06-11T11:33:07+00:00

I have the following table, where I need to update the Check_Status from Completed

  • 0

I have the following table, where I need to update the Check_Status from Completed to ‘Not Completed’ for Greatest Transaction_ID of Specific Prod_ID:

Tran_ID     Prod_ID    Check_Status
-------     --------   ------------
107893      XA         Completed
107892      XA         Completed
107891      XA         Completed
107890      XB         Completed
107889      XB         Completed
107888      YC         Completed
107887      YC         Completed
107886      YC         Completed
107885      YC         Completed

My results should be displayed as following i.e., product id XA has the greatest Trans Id as 107893, should be updated as ‘Not-Completed’. Remaining things should be unchanged. Similarly for other Product Id XB and XC.

Tran_ID    Prod_ID     Check_Status
-------    --------    ------------
107893     XA          Not-Completed
107892     XA          Completed
107891     XA          Completed
107890     XB          Not-Completed
107889     XB          Completed
107888     YC          Not-Completed
107887     YC          Completed
107886     YC          Completed
107885     YC          Completed
  • 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-11T11:33:08+00:00Added an answer on June 11, 2026 at 11:33 am
         UPDATE Transactions set 
        Check_Status= 'Not completed' 
         where Tran_ID IN (
            Select MAX(Tran_ID) as Tran_ID from 
    Transactions Group by Prod_ID)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following statement that I need to run on a table which
i have the following query to list the employees of two table. i need
I'd need advice on following situation with Oracle/PostgreSQL: I have a db table with
I need a query which can do the following operation. I have a table
I have the following sql query: UPDATE (SELECT * FROM table_A INNER JOIN table_B
I have the following table in postgres: CREATE TABLE test ( id serial NOT
1I have the following two tables (sample data) and need to be able to
I have following Table with records for ActivityLog: ID, UserId, Category, Created 1 11
I have following table Id | Status | date ------------------- 1 | Onsite |2007
Imagine I have following table: NAME DATE OTHER_CONTANT 'A' '2012-06-05' 'baz' 'A' '2012-06-04' 'bar'

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.