MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.24k stars 21.41k forks source link

Please add alias on where clause #31719

Closed oscarzamora closed 5 years ago

oscarzamora commented 5 years ago

If you could please add the alias for the last containment query "ge", "gu".

Thanks


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AshokPeddakotla-MSFT commented 5 years ago

@oscarzamora Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

jonels-msft commented 5 years ago

@oscarzamora can you please provide a little more info about the query you are referring to, and how you would like it to change?

jjfrost commented 5 years ago

I believe the request from @oscarzamora is to change this query below, into something like the second query below, such that the 'where' clause and other clauses are also using the aliases of 'gu' and 'ge' for technical clarity:

--- Current Query in Doc ---

SELECT login, count() FROM github_events ge JOIN github_users gu ON ge.user_id = gu.user_id WHERE event_type = 'CreateEvent' AND payload @> '{"ref_type": "repository"}' GROUP BY login ORDER BY count() DESC;

--- Updated Query ---

SELECT gu.login, count() FROM github_events ge JOIN github_users gu ON ge.user_id = gu.user_id WHERE ge.event_type = 'CreateEvent' AND ge.payload @> '{"ref_type": "repository"}' GROUP BY gu.login ORDER BY count() DESC;