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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:29:44+00:00 2026-06-11T10:29:44+00:00

I want an sql query to return the following data: DES_EVENT | DATE_EVENT |

  • 0

I want an sql query to return the following data:

DES_EVENT | DATE_EVENT | INSCRIBED_PARTICIPANTS

And my Tables are (other columns are hidden)

**EVENT**
ID
DES_EVENT
DATE_EVENT

**EVENT_ACCESS**
NAME
EVENT_ID

**PARTICIPANT**
EVENT_ID

NOTE: The table participant registers every event in which a participant is enrolled.

I want to know what events a given user organized and how many participants were enrolled.

I’ve tried to do the following query:

SELECT
e.des_event,
e.date
FROM
event e,
event_access ea
WHERE
ea.name = ?
AND
ea.event_id = e.id

with this query I can not get the number of participants. So I tried to do the following query:

SELECT
e.des_event,
e.date
FROM
event e,
event_access ea,
participant p
WHERE
ea.name = ?
AND
ea.event_id = e.id
AND 
p.event_id = ea.event_id

and the rows of each event are repeated for each participant enrolled on this event, but I want to get this numbers of replicates in another column in the result of the sql like I put on the top of the question.

If I use the count() function the oracle returns an error

(ORA-00937: not a single-group group function)

How can I get the correct results?

  • 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-11T10:29:45+00:00Added an answer on June 11, 2026 at 10:29 am

    If I understand you, you want

    SELECT e.des_event,
           e.date,
           count(*) num_participants
      FROM event e,
           event_access ea,
           participant p
     WHERE ea.name = ?
       AND ea.event_id = e.id
       AND p.event_id = ea.event_id
     GROUP BY e.ddes_event, e.date
    

    If that is not what you want, can you post a bit of sample data and post the results that you are looking for? Describing the results like you’ve done is great but some concrete test cases may help clarify things.

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

Sidebar

Related Questions

I want to write a SQL query like the following. Its syntax is not
I want to convert the following SQL Query to a SubSonic Query. SELECT [dbo].[tbl_Agency].[ParentCompanyID]
I want to translate following simple sql query into Linq to NHibernate: SELECT NewsId
Good Day, I have a sql query that returns the following data: EmployeeID...Employee 555..........John
I want to create an SQL query that selects the pictures of females in
I hace sql query through this i want to calculate the records after 05:00:00
I want to parse a SQL query into an array. I could not figure
I want to write an SQL query using the LIKE keyword. It should search
I want to port this SQL query, which works just fine on SQL Server,
I want to run a sql query on a specific schedule (weekly) and need

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.