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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:01:13+00:00 2026-06-07T14:01:13+00:00

What wrong I am doing with this query, I always get the error whenever

  • 0

What wrong I am doing with this query, I always get the error whenever I try to execute it.

SELECT
   t1.buyer_id,
   t1.item_id,
   t1.created_time,
   t2.product_id,
   t2.timestamps
FROM
   TestingTable1 t1
   JOIN
   (
   SELECT
      user_id,
      prod_and_ts.product_id as product_id,
      prod_and_ts.timestamps as timestamps
   FROM 
      TestingTable2 
      LATERAL VIEW explode(purchased_item) exploded_table as prod_and_ts
   ) t2
   ON(t1.buyer_id = t2.user_id)
WHERE
   (t1.item_id <> t2.product_id)
   OR (unix_timestamp(t1.created_time) <> t2.timestamps);

This is the error I get-

FAILED: Error in semantic analysis: line 13:6 Invalid Table Alias or 
Column Reference prod_and_ts
  • 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-07T14:01:14+00:00Added an answer on June 7, 2026 at 2:01 pm

    I’m not sure, but Lateral View Syntax

    LATERAL VIEW udtf(expression) tableAlias AS columnAlias (',' columnAlias)*
    

    In your case prod_and_ts it’s a columnAlias, not tableAlias and you cannot use prod_and_ts.product_id. Instead try to use just prod_and_ts.

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

Sidebar

Related Questions

I always get the error too many Columns when i execute this query. SELECT
what am I doing wrong in this code.. I should get the class name
What am I doing wrong with this: $sql = SELECT * FROM content WHERE
I am currently doing this, but I am doing something wrong :): <Style TargetType={x:Type
I'm mot sure if I'm doing this wrong or not I don't know if
I am completely new to iOS development so I may be doing this wrong
What am I doing wrong in this HTML code: <html> <head> </head> <body> <div
Hi can someone tell me what i'm doing wrong in this jquery statement. I
Can anyone please point out what im doing wrong with this Stored Procedure please.
I can't figure out what I'm doing wrong in this template. Here's my data:

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.