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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:15:01+00:00 2026-05-25T15:15:01+00:00

I have a SQL query that produces a result set as shown below: (SELECT

  • 0

I have a SQL query that produces a result set as shown below:

(SELECT dv.venue as venue, pglr.users_oauth_uid as user_id, pgl.date as guest_list_date
    FROM promoters_guest_lists pgl
    JOIN users_promoters_guest_list_authorizations upgla 
    ON pgl.users_promoters_guest_list_authorizations_id = upgla.id
    JOIN promoters_guest_lists_reservations pglr
    ON pgl.id = pglr.promoters_guest_lists_id
    JOIN promoters_venues pv
    ON pv.id = upgla.promoters_venues_id
    JOIN data_venues dv
    ON dv.id = pv.venue_id
    WHERE upgla.deactivated = 0)

    UNION ALL

    (SELECT dv.venue as venue, pglre.oauth_uid as user_id, pgl.date as guest_list_date
    FROM promoters_guest_lists pgl
    JOIN users_promoters_guest_list_authorizations upgla 
    ON pgl.users_promoters_guest_list_authorizations_id = upgla.id
    JOIN promoters_guest_lists_reservations pglr
    ON pgl.id = pglr.promoters_guest_lists_id
    JOIN promoters_guest_lists_reservations_entourages pglre
    ON pglr.id = pglre.promoters_guest_lists_reservations_id
    JOIN promoters_venues pv
    ON pv.id = upgla.promoters_venues_id
    JOIN data_venues dv
    ON dv.id = pv.venue_id
    WHERE upgla.deactivated = 0)
    ORDER BY 1

Estate  504405294   2011-08-30
Estate  504405294   2011-09-20
Estate  504405294   2011-09-19
Estate  504677586   2011-08-30
Estate  100002624783324 2011-08-30
Estate  100002624783324 2011-09-20
Estate  1451950133  2011-09-19
Estate  1634269784  2011-09-19
Estate  100002624783324 2011-09-19
Royale  504405294   2011-08-28
Royale  504405294   2011-09-04
Royale  100002624783324 2011-08-28
Royale  1634269784  2011-09-04

I’m wondering if it’s possible to return simple counts of all the records that equal a certain value in the first column, for every value in the first column. In total I anticipate 6 unique values in the first column, but it can vary between query executions.

  • 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-25T15:15:02+00:00Added an answer on May 25, 2026 at 3:15 pm
    SELECT venue, COUNT(*) FROM (YOUR_QUERY_HERE) t GROUP BY t.venue;
    

    that’s all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very complex Linq to SQL query that returns a result set
I have an SQL query that takes the following form: UPDATE foo SET flag=true
I have a sql query that performs the type of select I'm after: select
I have a query that produces the following output in a nested set structure:
I have a MySQL SQL query that selects products and the text translations: SELECT
I have the following LINQ conditional where clause query that produces a result of
I have a sql query that runs super fast, around one second, when not
I have a SQL query that takes a very long time to run on
We have a SQL query that pulls a large number of fields from many
I have a SQL query that is supposed to pull out a record 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.