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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:38:07+00:00 2026-06-08T07:38:07+00:00

When I run the query below I get this message: SQL Error: ORA-00904: B.MEMBERS_COUNT:

  • 0

When I run the query below I get this message:

SQL Error: ORA-00904: “B”.”MEMBERS_COUNT”: invalid identifier
00904. 00000 – “%s: invalid identifier”

select pt.paym_type_name, pt.dvd_allowed, b.members_count
from payment_type pt
where paym_type_id in (select paym_type_id
                        from (SELECT paym_type_id, 
                                     count(paym_type_id) as members_count
                              FROM user_payment
                              WHERE (paym_type_id=1   OR
                                     paym_type_id=2   OR
                                     paym_type_id=3)  AND 
                                     SYSDATE <= (ADD_MONTHS(paym_date, 12) ) 
                              GROUP BY paym_type_id
                              ORDER BY MEMBERS_COUNT DESC) b
                        where rownum=1)
;

I don’t understand why. How can I fix it? I do need to add the column MEMBERS_COUNT at the end.

  • 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-08T07:38:11+00:00Added an answer on June 8, 2026 at 7:38 am
    select pt.paym_type_name, pt.dvd_allowed, b_outer.members_count
    from payment_type pt,
        (select paym_type_id,members_count
          from (SELECT paym_type_id, 
                       count(paym_type_id) as members_count
                 FROM user_payment
                WHERE (paym_type_id=1   OR
                       paym_type_id=2   OR
                       paym_type_id=3)  AND 
                       SYSDATE <= (ADD_MONTHS(paym_date, 12) ) 
                       GROUP BY paym_type_id
                       ORDER BY MEMBERS_COUNT DESC) b_inner
                       where rownum=1) b_outer
    where paym_type_id =b_outer.paym_type_id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run the below query..... SELECT SUM(PAPostedTotalCostN) AS Total_Cost FROM PA01201 WHERE PA01201.PAcontid =
If I run this query in Toad: SELECT BANDID, BANDNAME FROM WOODSTOCK WHERE BANDNAME
i am useing the query below, when i run this query once per page
Im trying to return the member id in this query below. If i run
I have the query below that when run it says that 325 rows were
If I run a query simialr to: SELECT * FROM user u LEFT JOIN
When I run the query : select count(*) from (select idCover from x90..dimCover group
If I run a query such as: SELECT COUNT(*) as num FROM table WHERE
When I run the query: select (100/50) It give me 2 - good. But
Query below takes 20 seconds to run. user_table has 40054 records. other_table has 14000

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.