Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

[Tableau]: GROUP BY X with alias (as columnd name) and INNER JOIN #535

Closed
kuba-- opened this issue Nov 6, 2018 · 0 comments
Closed

[Tableau]: GROUP BY X with alias (as columnd name) and INNER JOIN #535

kuba-- opened this issue Nov 6, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kuba--
Copy link
Contributor

kuba-- commented Nov 6, 2018

Add support for this kind of queries:

SELECT SUBSTRING(`repositories`.`repository_id`, 1, 1024) AS `repository_id`
FROM `repositories`
  INNER JOIN `commits` ON (SUBSTRING(`repositories`.`repository_id`, 1, 1024) = SUBSTRING(`commits`.`repository_id`, 1, 1024))
  INNER JOIN `files` ON (`repositories`.`repository_id` = SUBSTRING(`files`.`repository_id`, 1, 1024))
GROUP BY 1

So far we get an error:

[MySQL][ODBC 5.3(w) Driver][mysqld-5.5.10-Vitess]unknown error: ambiguous column name "repository_id", it's present in all these tables: repositories, commits, files
SELECT SUBSTRING(`repositories`.`repository_id`, 1, 1024) AS `repository_id`
FROM `repositories`
  INNER JOIN `commits` ON (SUBSTRING(`repositories`.`repository_id`, 1, 1024) = SUBSTRING(`commits`.`repository_id`, 1, 1024))
  INNER JOIN `files` ON (`repositories`.`repository_id` = SUBSTRING(`files`.`repository_id`, 1, 1024))
GROUP BY 1
@kuba-- kuba-- added bug Something isn't working 3rd-party Third party compatibility and removed 3rd-party Third party compatibility labels Nov 6, 2018
@kuba-- kuba-- self-assigned this Nov 6, 2018
@kuba-- kuba-- closed this as completed Nov 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant