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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:20:07+00:00 2026-05-16T04:20:07+00:00

Why am I getting this error: 1054 – Unknown column ‘t.type’ in ‘field list’

  • 0

Why am I getting this error:

1054 – Unknown column ‘t.type’ in ‘field list’

I have a column called type in my table. And I’ve got the table ‘tester’ using an alias t.

SELECT y.*,
           (SELECT COUNT(*)
              FROM (SELECT *, 
                           CASE t.type
                             WHEN 'Advanced' THEN t.type
                             ELSE 'Non-Advanced'
                           END AS group_type
                      FROM tester) x
             WHERE x.group_type = y.group_type
               AND (x.grade1 + x.grade2) >= (y.grade1 + y.grade2)) AS rank
      FROM (SELECT t.name,
                   t.grade1,
                   t.grade2,
                   t.type,
                   CASE t.type
                     WHEN 'Advanced' THEN t.type
                     ELSE 'Non-Advanced'
                   END AS group_type
              FROM tester t) y

OMGPonies, any ideas?

Thank you.

-Laxmidi

  • 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-16T04:20:08+00:00Added an answer on May 16, 2026 at 4:20 am

    /me smacks my forehead – my fault, sorry.

    Use this:

    SELECT y.*,
           (SELECT COUNT(*)
              FROM (SELECT *, 
                           CASE type
                             WHEN 'Advanced' THEN type
                             ELSE 'Non-Advanced'
                           END AS group_type
                      FROM tester) x
             WHERE x.group_type = y.group_type
               AND (x.grade1 + x.grade2) >= (y.grade1 + y.grade2)) AS rank
      FROM (SELECT t.name,
                   t.grade1,
                   t.grade2,
                   t.type,
                   CASE t.type
                     WHEN 'Advanced' THEN t.type
                     ELSE 'Non-Advanced'
                   END AS group_type
              FROM tester t) y
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started getting: OperationalError at /admin/contact_us/contact_details/ (1054, Unknown column 'contact_us_contact_details.address_title' in 'field list') Request
I am getting the following error from this query: 1054 - Unknown column 'sheet_items.color_id'
I keep getting the error 1054 - Unknown column 'apa_calda' in 'where clause' in
I'm getting this error in my cakephp application Warning (512): SQL Error: 1054: Unknown
Hey all, I'm getting an error OperationalError: (1054, Unknown column 'XX' in 'where clause')
I keep getting this error and have no idea why. I googled and scanned
Possible Duplicate: Was: Not unique table :: Now: #1054 - Unknown column - can't
Im getting this error Internal zval's can't be arrays, objects or resources in Unknown
Getting this error: Each GROUP BY expression must contain at least one column that
I keep getting MySQL error #1054, when trying to perform this update query: UPDATE

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.