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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:33:23+00:00 2026-06-04T19:33:23+00:00

My query works, and looks like this: SELECT SUM(`WTE`) / 1000 AS WTE FROM

  • 0

My query works, and looks like this:

   SELECT 
     SUM(`WTE`) / 1000 AS WTE
   FROM  `orthoptists` AS o
   LEFT JOIN `instances` AS i
   ON o.instance_FK = i.id
   WHERE i.region = 14 AND o.band = "D" AND o.age = "A"  ;

I have 10 possible values each for o.band and o.age, and I need the result of this query for each permutation of those two values.

I am very new to SQL: is there a way to use a sub-query to produce all the results for one value in o.band (say)? Or even to do the whole lot in one go?

Performance isn’t important in this: convenience is.

  • 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-04T19:33:24+00:00Added an answer on June 4, 2026 at 7:33 pm

    Try this

       SELECT 
         SUM(`WTE`) / 1000 AS WTE, o.band, o.age
       FROM  `orthoptists` AS o
       LEFT JOIN `instances` AS i
       ON o.instance_FK = i.id
       WHERE i.region = 14
       group by o.band, o.age
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The query which works looks like this : SELECT d.dosno, CAST(SUM(k.uur) + SUM(k.minuut) /
I have this elementary query: SELECT d.description, o.code FROM order_positions AS o LEFT JOIN
Alright. I have a query that looks like this: SELECT SUM(`order_items`.`quantity`) as `count`, `menu_items`.`name`
This query works fine for me: $query = SELECT p.topnode_id, p.param_key, p.param_value FROM tbl_params
This query works: item = db.GqlQuery(SELECT * FROM Item WHERE CSIN = 13)[0] although
I have this working query which works correctly: select problems.problem_id , problem_title , sum(
I have a query that looks like this: var q = from x in
I'm selecting a variety of columns from my database, and my query looks like
Query: SELECT 'SUMS' AS [Desc], SUM(PriceN) AS Nett, SUM(PriceG) AS Gross FROM Resources gives
I have a query that does this: SELECT `threaded_comments`.* FROM `threaded_comments` WHERE `threaded_comments`.`parent_id` IN

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.