Posts by Viitor Oliveira • 17 points
3 posts
-
0
votes0
answers42
viewsQ: Naming SQL query tabs
I have a tremendous doubt, I would like to name each query by its content, but I cannot identify how. As a result I have the image below: My code is this one: SELECT a.Marca, COUNT(a.Pedido) AS…
sqlasked Viitor Oliveira 17 -
-2
votes2
answers712
viewsQ: Subquery (SQL error (1242): Subquery Returns more than 1 Row)
I created the following query: SELECT a.`CPF/CNPJ`, a.Cliente, a.Cep, a.Cidade, a.Estado, COUNT(a.`CPF/CNPJ`) AS Novas_Instancias, ( SELECT COUNT(c.`CPF/CNPJ`) FROM relat_instancias c GROUP BY…
-
1
votes0
answers72
viewsQ: Result + Grouping Mysql result
I have a tremendous doubt in mounting this query that I am attaching, I have a table and cross with another to know the state where had more sales, where the result is grouped and shows me the total…