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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:58:26+00:00 2026-06-15T04:58:26+00:00

select c.id, c.fname, c.lname, d.phoneList from customers c left outer join ( select listagg(telNo,

  • 0
select c.id, c.fname, c.lname, d.phoneList
  from customers c
  left outer join
       (
        select listagg(telNo, ',') within group (order by telNo) as phoneList
          from customerPhones 
         group by p.telNo
       ) d 
   on (c.id = d.id)

On the above query, i am getting the following error on the statement c.id = d.id

ORA-00904 "d.id" invalid identifier. 

It only works if i include it in the select statement and meaning that need to include it in the group by statement. Is there any way i can use d.id without having to include it in the group by statement?

  • 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-15T04:58:27+00:00Added an answer on June 15, 2026 at 4:58 am

    just simplify to this?

    SQL> select * from customers;
    
            ID FNAME                LNAME
    ---------- -------------------- --------------------
             1 John                 Smith
             2 Joe                  Bloggs
    
    SQL> select * from customerphones;
    
            ID TELNO
    ---------- --------------------
             1 0123456789
             1 0207983498
             2 0124339848
             2 09348374834
             2 02387694364
    
    SQL> select c.id, c.fname, c.lname, listagg(telNo, ',') within group (order by telNo) as phoneList
      2    from customers c left outer join customerphones p on p.id = c.id
      3   group by c.id, c.fname, c.lname
      4  /
    
            ID FNAME                LNAME                PHONELIST
    ---------- -------------------- -------------------- ------------------------------
             1 John                 Smith                0123456789,0207983498
             2 Joe                  Bloggs               0124339848,02387694364,0934837
                                                         4834
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following query: SELECT friendship.dom, friendship.sub, user.id, user.fname, user.lname FROM friendship LEFT JOIN user
I currently have a query similar to: SELECT users.fname, users.lname, sales.date FROM users LEFT
this code work for me: SQL = SELECT _id,Fname,Lname,Phone,Car,CarNum,PicNum from MEN order by Lname,Fname;
I have the following Join statement : SELECT DISTINCT dn.fname, dn.lname,w.websit,q.qual,q.year,q.postqual,p.pnumber,a.accred,n.nspecial FROM cur_doctor_names dn
For ex. My query : select * from (SELECT distinct b.lname||' '||b.fname as Manager,b.EMPID
Here's my function function GetUser($id) { global $pdo; $stmt = $pdo->prepare('SELECT lname,fname,mi FROM user
I have the following code snippet. SqlCommand cmd = new SqlCommand(SELECT FName,LName FROM EMPLOYEE_TABLE
I run this query: SELECT u.user_id, u.fname, u.lname, n.title, n.news_id, n.post, n.zip, z.city,z.state_abbr FROM
Take a look at the following mySQL query: SELECT fname,lname FROM users WHERE users.id
Why does this return 23 rows (the right amount): select users.user_id, users.fname, users.lname, stars.stars,

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.