Re: [Maria-discuss] Query ambiguity

2018-05-17 Thread Karthick Subramanian
Check whether you really need a comma here: *metrics_5.id ,* *(SELECT * Also in your screen shot, AS 'LT CPC`, there is no comma and you use derived table in SELECT and trying to use JOIN in the FROM using this. Sorry to say this, I think you can either break this logic

Re: [Maria-discuss] Query ambiguity

2018-05-17 Thread Dev C
Modified code and error *** SELECT campaigns_5.name AS `Campaign Name`, adgroups_5.name AS `Adgroup Name`, STNegData1W.query, keywords_5.matchType AS `Match Type`, Sum(metrics_5.clicks) AS `LT Clicks`, Sum(metrics_5.costs) AS `LT Spend`, Sum(metrics_5.orders) AS `LT Orders`,

Re: [Maria-discuss] Query ambiguity

2018-05-17 Thread Karthick Subramanian
I think the OP needs to try a lot of googling and stackoverflow etc first and break the heads first and then post it here if it's really required. IMHO, if people start asking the SQL problems (mainly most of the sql issues are knowledge gap related) here, then I think the quality of this forum

Re: [Maria-discuss] Query ambiguity

2018-05-17 Thread Pantelis Theodosiou
What Rhys said, please post queries as text, not as images. The issue is likely due to the way you structured your query. You have put a derived table in a random place (in the SELECT list). Please try to read about CTEs. It will help you design those complex queries better and make them more

Re: [Maria-discuss] Query ambiguity

2018-05-17 Thread Rhys.Campbell
You're not making a lot of sense here. Please explain the "ambiguity". That's a fairly complex query so you should include as text. "Does not work" <- In the image. It helps if you include error message. From: Maria-discuss