Most voted "query" questions
Query or *query* refers to the act of recovering data previously stored in a computerised system from certain parameters and/or filters, by means of a specific command or operator.
Learn more…1,160 questions
Sort by count of
-
-3
votes2
answers162
viewsMYSQL - How to return records that exist in one table and do not exist in another?
I have the npsparticipantes table that receives the id that comes from the contracts table. How do I recover all contracts that are not added to the npsparticipantes table?…
-
-3
votes2
answers108
viewsConsultation with grouping
Good morning gentlemen(s) I have the following problem: [Edited] As can be seen in the image above, there are several fields with the same result (minus the "desric" column). What I need is that in…
-
-4
votes1
answer146
viewsGood practices with big queries?
Are there good practices when it comes to SQL queries within php? Or is there an alternative to not "smudge" the code with a giant query in the middle? Edit: What I was looking for was just views,…
-
-4
votes1
answer159
viewsSql query formatting in one line only
In some cases, when we save a query. sql, even if it is indented correctly in the SSMS when we open in the Notepad (windows) all the text is in one line, joining END with GO (ENDGO) at the end of a…
-
-4
votes1
answer53
viewsmysql description
look at my code select count(alunocursos.codAluno), alunocursos.codCurso from alunocursos join aluno on (aluno.id = alunocursos.codAluno) group by alunocursos.codCurso this will make me return the…
-
-4
votes1
answer37
viewsSubquery Delete in Mysql
I have the following table (Example), where the ID user 151 has 2 records: id (Primary Key) user name 1 151 2 123 3 985 4 151 5 652 I need to delete this user’s 2 records. The problem is that as the…
-
-5
votes2
answers54
viewsI have a QUERY that doesn’t display what I really need
My Query: select id from clientes where cliente = '$cliente' AND status = '2' AND (tipo <> '0' AND (disponibilidade <> '0' OR vanual <> '0' OR vtemporada <> '0')) I need it…
-
-5
votes1
answer60
viewsI NEED HELP ORDERING A QUERY
I’m doing a query where I’m returning the last record of the day(which in case has the days but there are several time records in a day, and I’m picking the last of them in a sub select), the…
-
-5
votes1
answer67
viewsHow to use the ROUND function in Laravel
insira o código aquiI have the following query in PHP: $transferencia = $conecta->rawSelect( 'SELECT * FROM register WHERE ROUND(valor,2)="' . $json->VALORLIQUIDO . '" ' ); How I perform this…
-
-5
votes1
answer60
viewsShow bd field on web page
I’m new in web development, I took a course and I’m using as a base the site we developed there. But some things I still don’t understand well and I’m having trouble pulling the field nome database.…