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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:50:24+00:00 2026-06-10T00:50:24+00:00

I have two SQL queries that I would like to combined into one, if

  • 0

I have two SQL queries that I would like to combined into one, if its possible. The fist is to get information about a shop order and the second is to get revision information from all previous records with the same shop_order_id.

The first query:

SELECT so.shop_order_id, so.shop_order_suffix, so.status, so.mfg_method, so.description
  FROM shop_order so
  WHERE so.shop_order_id = 'ZZ1810C'
    AND so.shop_order_suffix = '000';`

The second query:

SELECT so.user_att27, so.user_att28 
  FROM shop_order so
  WHERE so.shop_order_id LIKE 'ZZ1810C%'
  ORDER BY shop_order_suffix DESC;`

Is it possible to combined them so that they run at one time and if so how would i got about doing it?

  • 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-10T00:50:26+00:00Added an answer on June 10, 2026 at 12:50 am

    I think you need a JOIN :

        SELECT so.shop_order_id, so.shop_order_suffix, so.status, so.mfg_method, so.description,  so2.user_att27, so2.user_att28
        FROM shop_order so 
        JOIN shop_order so2 ON so2.shop_order_id LIKE 'ZZ1810C%'
        WHERE so.shop_order_id = 'ZZ1810C' AND so.shop_order_suffix = '000'
        ORDER BY shop_order_suffix DESC;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two queries I would like to append in MySQL. I have found
I am using SQL Server and I have two tables and I would like
I have two very similar SQL queries that return a count of minutes spent
I'm trying to combine two queries into one if it's possible, here is what
I have a small sql question for you. I have two queries: SELECT tbl_CostPrevisions.Month,
I currently have two SQL commands. One retrieves a list of unique IDs from
I have two PL/SQL Stored procedure each handling its own Transaction (Begin/Commit and Rollback
I would like to execute a Linq to Sql statement that captures the count
I have a table that its structure is as like as follow: `id` int(10)
I have two very complex queries that are displayed on the same form and

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.