MySQL Forums
Forum List  »  Newbie

Re: ANIDATED SELECT
Posted by: Alvaro Garcia Solano
Date: October 24, 2017 01:52AM

At the moment i have the following:

select s.storename, x.more_than+3
from storeinfo s
join (
select orders.store_id, count(*) as more_than_3
from order_info
join orders on orders.orders_id=orders_info.orders_id
where orders_info.num_items > 3 and orders.timeplaced > current timestamp - 1 day
group by orders.store_id
) x.store_id = s.store_id

Does x.store_id has to be the id of the store in the orders table right?

If so I get the following error message:
object-name IS NOT VALID IN THE CONTEXT WHERE IT IS USED for x.store_id

Any ideas?

Options: ReplyQuote


Subject
Written By
Posted
October 22, 2017 01:55PM
October 22, 2017 02:12PM
October 23, 2017 05:53AM
October 23, 2017 05:56AM
October 23, 2017 09:47AM
October 23, 2017 10:34AM
October 23, 2017 11:14AM
October 23, 2017 12:48PM
Re: ANIDATED SELECT
October 24, 2017 01:52AM
October 24, 2017 08:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.