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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:32:33+00:00 2026-05-27T02:32:33+00:00

I’m getting Error Code: 1054. Unknown column ‘E1.extensao’ in ‘field list’. I changed table

  • 0

I’m getting “Error Code: 1054. Unknown column ‘E1.extensao’ in ‘field list'”. I changed table names but my query is as follows:

SELECT E1.stateName, E1.city, E1.boughtEnough, E2.bought
FROM 
    (SELECT count(DISTINCT idClient),city,stateName FROM
        (SELECT
            max(n.ordervalue) as boughtEnough,
            m.idClient,
            i.nome AS city,
            i.id AS cityId,
            i.stateName
        FROM Clients c
        INNER JOIN client_order m ON c.idClient = m.idClient
        INNER JOIN orders n ON m.client_order = n.client_order
        INNER JOIN orderDetail p ON n.idorder = p.idorder
                                AND p.idCurso = m.idCurso
        INNER JOIN cities i ON c.city = i.id

        WHERE
            m.idCurso = '10'
        GROUP BY 
            m.idClient,
            i.nome,
            i.id,
            i.stateName
        HAVING max(n.orders) >= 6) t
    GROUP BY t.city, t.stateName
    ORDER BY t.stateName,t.city) E1
JOIN (SELECT count(DISTINCT idClient),city,stateName FROM
        (SELECT
            count(n.ordervalue) as bought,
            m.idClient,
            i.nome AS city,
            i.id AS cityId,
            i.stateName
        FROM Clients c
        INNER JOIN client_order m ON c.idClient = m.idClient
        INNER JOIN orders n ON m.client_order = n.client_order
        INNER JOIN orderDetail p ON n.idorder = p.idorder
                                AND p.idCurso = m.idCurso
        INNER JOIN cities i ON c.city = i.id

        WHERE
            m.idCurso = '10'
        GROUP BY 
            m.idClient,
            i.nome,
            i.id,
            i.stateName
        HAVING ((max(n.orders) < 6) AND (count(n.orders) >= 1))) t
    GROUP BY t.city, t.stateName
    ORDER BY t.stateName,t.city) E2 ON E1.cityId = E2.cityId

I’m more used to SQL Server, not MySQL. What am I getting wrong?

  • 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-27T02:32:34+00:00Added an answer on May 27, 2026 at 2:32 am

    I assume that E1.extensao means E1.boughtEnough? Look closely at how E1 is defined:

        (SELECT count(DISTINCT idClient),city,stateName FROM
            (SELECT
                max(n.ordervalue) as boughtEnough,
            ...) t
        ...) E1
    

    There’s a t.boughtEnough, but you’re not “passing it up” to E1.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to construct a data frame in an Rcpp function, but when I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

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.