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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:33:18+00:00 2026-05-17T18:33:18+00:00

Suppose I have two tables Table1 and Table2 with the following data. Column1 Column2

  • 0

Suppose I have two tables Table1 and Table2 with the following data.

Column1 Column2 Column3
AAA      KKK       9
BBB      LLL       7
CCC      MMM       9
DDD      MMM       5
EEE      MMM       7
FFF      NNN       9
GGG      OOO       1


Column4 Column1
TTT      DDD
TTT      BBB
UUU      EEE
VVV      BBB
WWW      AAA
WWW      BBB
XXX      DDD
YYY      EEE
YYY      DDD
YYY      CCC
YYY      FFF

The query is of selecting “select value(s) from column4 which matches the tuple result of column1 when column2 has the value ‘MMM'(‘CCC’,’DDD’,’EEE’) this result should match with all results from column4”
the result is ‘YYY’

The error message is

    SELECT DISTINCT t2.Column4
     FROM Table1 t1
LEFT JOIN Table2 t2 ON t1.Column1 = t2.Column1
    WHERE Column2 = 'MMM'
 GROUP BY t1.Column2
   HAVING COUNT(t1.Column1) = COUNT(t2.Column1)
         *
    ERROR at line 1:
 ORA-00904: "T1"."Column1": invalid identifier
  • 1 1 Answer
  • 2 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-17T18:33:19+00:00Added an answer on May 17, 2026 at 6:33 pm
       SELECT t2.Column4
         FROM Table1 t1
    LEFT JOIN Table2 t2 ON t1.Column1 = t2.Column1
        WHERE Column2 = 'MMM'
     GROUP BY t2.Column4
       HAVING COUNT(t1.Column1) = COUNT(t2.Column4)
    

    What about this query?

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

Sidebar

Related Questions

Suppose I have two tables Main and Other like the following: Main +----------+-----------------------------------+ |
In SQL server 2008: Suppose I have two tables. Table1 has 3 fields: Name,
I use SQL Server 2000. Suppose I have two tables like the following: Area
Suppose I have the following two tables: STUDENT studentid lastname firstname 1 Smith John
Suppose I have the following two tables in my MySQL database: Table 1:: EMP:
Suppose I have two tables, - emp(empId number(1),empName varchar2(50)) and - manager(manId number(5),managerName varchar2(100))
Suppose we have two tables Foo and Bar. I have an association table Foo_Bar
Suppose I have two tables that are linked (one has a foreign key to
Suppose I have two tables on a database, T 10 and T 11 ,
Suppose we have the contents of tables x and y in two dataframes 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.