I believe this is a somewhat specific question, because I do not find anything related yet.
I have a table named contas_produtos , which is a NxN relation between the contas and the produtos tables.
The table has the...
I have the following table in MySQL:
I wanted to search for users who have the color BLUE but do not have the GREEN color, ie, this table would list me the user 3 only, I tried this way:
SELECT * FROM usuario_cor WHERE tipo = 'azul' A...
I have a message table in the following scheme:
Id | osID |Interessado | Remetente | Destinatario | Msg
--------------------------------------------------
1 | 2 |João | João | Maria |bla bla bla...
2 | 2 |João...
Hello! I will explain from the beginning .. I am comparing the following tables accounts with clientes
select uses user_id to find all clients with same users_id2 in table clientes as described below, right th...
I have a table called contacts , where all contacts made on the site are registered. There is also a table named status , where the service status of each contact is stored.
In doubt, I need to SELECT contacts, and in LEFT JOIN only show...
I'm having a hard time putting together a select with GROUP BY . What I want to do is this:
I have three tables:
bicos
idbico, idempresa, idbomba
abastecimentos
idabastec, idbico, idempresa, valora...
I'm trying to organize a return of my mysql database in months, that is, so that I have groups of the months of donations that the site that I work receives, I tried:
SELECT * , MONTH( 'DataConfirmacao' ) FROM 'doacoes' WHERE Pendente = '1'...
I have a table like this:
++++++++++++++++++++++++++++++++++++++++
+ Nome | Cargo | Estado +
+ ++++++++++++++++++++++++++++++++++++++
+ Joao | Estagiário | RJ +
+ Maria | Analista | RJ +
+ Thiago| Ge...
I have a table with transport data from my company employees:
nome ! valor1 ! valor2 ! valor3
teste1 ! 6.50 ! 0.00 ! 0.00
teste2 ! 4.30 ! 2.80 ! 1.10
teste3 ! 8.40 ! 1.10 ! 0.00
teste4 ! 2.85 ! 1.10 ! 0.00
Where it is possible for the empl...