I'm trying to set up a query, where I can print out the broker's name and the percentage of the sale pertaining to it. When grouping by name_corretor1, the field name_corretor2 does not group and vice versa, when grouping both the grouping is no...
Suppose we have a 'Vendas' table with the following 'estado', 'cidade', 'vendedor', 'valor' columns.
'estado' and 'cidade' would be where the sale was made and 'vendedor' would be what made that sale. 'v...
My table Acidente looks something like this:
Vitima - DataRegistro
Pedro - 10/02/2015
Pedro - 20/03/2015
Maria - 01/05/2015
Maria - 01/05/2015
I need to make a query (Sql) that returns the records that contain:
Victim's name...
Suppose the following table that records author posts in a blog.
An author can have several posts.
So I have several reps of authors on this table of the different posts he made.
How do I make a query to fetch the content of the most re...
I'm trying to set up a query to fetch results in a table where I need to determine a condition for one column, group for another, and display a third.
The database is composed of 6 tables, 5 of which are queried individually, containing: i...
I'm doing SQL in 2 tables in Oracle and would like to group the information according to the job code and also count how many people are in that charge.
I'm using the following SQL :
select f.numemp, f.numcad, f.nomfu...
I have the following data:
|--------------------------------------------------------|
|USER | ID | DEVICEID | DATE |
|--------------------------------------------------------|
|7 | 14450 | aa6603ceef3b397c | 2...
I know that I can not have clauses in the select that do not appear in Group By. But is it possible otherwise? For example:
Select B
From Table
Group By A,B
I'm having trouble using the command GROUP BY , in SAS .
By definition, SAS only accepts GROUP BY if a summary function is used in SELECT . Until then, okay. Turning Proc below, the result exits correctly:
proc sql;
c...
I'm trying to sort a query in the database by grouping the information, however this is showing the first one registered in the database, but I want the last.
SELECT *
FROM base_rating AS B
JOIN historico_rating AS H ON B.id = H.id_base_rating...