Como ordenar por valor agrupado em Consulta (SELECT) existente na linguagem de Manipulação de Dados (DML) do Azure SQL/SQL Server
This T-SQL code performs a query against a database that has a table named "f.Moeda_Cotacoes". I'll walk you through step-by-step what each
CURRENCY, AVG(TAXA_VENDA) AS VENDA_MED
f.Moeda_Cotacoes
GROUP BY:
VENDA_MED DESC:ORDER BY
Therefore, the code returns the average of the selling rates ("TAXA_VENDA") grouped by currency ("CURRENCY") from the "f.Moeda_Cotacoes" table. The results are sorted in descending order by the average sale ("VENDA_MED").
Data Scientist and Consultant for Digital and Analytics Solutions
@fabioms