MySQL Forums
Forum List  »  General

Re: Get the Maximum (Max) value BUT separate for EACH item
Posted by: Alexandre Salomé
Date: February 10, 2019 12:46PM

First of all, thank you feedback

Missing some trick, this is presenting the message:
/* Erro SQL (1248): Every derived table must have its own alias */


I tried:



select Nome, replace( max(sales), '.', ',' ) as max_sales
from (
select B.name, REPLACE(JSON_EXTRACT(A.attributes, '$.sale') ,'.',',') as sales
from tc_sales A
join tc_sellers B
ON A.id = B.id
WHERE
fixtime between '2019-01-01' and '2019-01-31'
)
group by Nome;



What could be wrong?

Options: ReplyQuote


Subject
Written By
Posted
Re: Get the Maximum (Max) value BUT separate for EACH item
February 10, 2019 12:46PM


Sorry, only registered users may post in this forum.

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.