Questions tagged as 'query'

3
answers

Query with inner join and LIKE operator

I have the following tables with their respective data Table1 +----------+------------+ | IdTabla1 | Velocidad1 | +----------+------------+ | 1 | 123.51 | | 2 | 123.55 | | 3 | 125.23 | | 4 | 125.87...
asked by 11.08.2018 / 10:05
1
answer

Update record comparing different columns

What I'm trying to do is generate an SQL statement that finds me the rows that have repeated data, and at the same time in different columns. My table is something like this: ID FECHA UNO DOS TRES ESTADO -- ---------- --- --- -...
asked by 19.02.2018 / 03:57
1
answer

Repeated rows in MYSQL query

Good I have a problem, it turns out that I have 3 tables that contain information about the event, another with the 'materials' (services) for that event and an intermediate table that generates me the N to N, when I want to show the event with...
asked by 21.12.2017 / 04:56
2
answers

Algebraic Sum of 2 Select SQL Server 2012

Good morning, I have the following Select in SQL Server 2012, and I need to do an algebraic sum of both Select of the quantity and total fields, since the result of each one gives me positive and negative values. SELECT T0.U_CTS_Vendedor, T5.[...
asked by 11.09.2017 / 14:02
3
answers

Get several data in a single mysql query

I have a mysql database of the index of a course (id,tipo,titulo,completado) I keep the different types that make up the index (classes, exercises and exams). I need to know how many exercises, classes and exams the course has to do so: S...
asked by 21.04.2017 / 20:40
2
answers

JoinS About the same Table with Null Values

You are trying to perform two JOINS to match the information of two tables, the first table contains a catalog of articles. id_art desc ------------------------ A1 Articulo A1 A2 Articulo A2 A3 Articulo A3...
asked by 11.05.2017 / 21:08
1
answer

How to subtract the results of a query in SQL?

I have the following query: SELECT ID,PLACA,SUM(GALONES) AS GALONES,SUM(MONTO) as MONTO,MONTH(FECHA1) MES,YEAR(FECHA2) AÑO FROM [db_stransportacion].[dbo].[v_combustible_Asignado] c INNER JOIN [db_stransportacion].[dbo].[t_Vehiculo] v ON c.ID=...
asked by 09.03.2018 / 16:34
2
answers

queries mysql ignore tildes

I wanted to see if there is any way to search within a document so that it does not take into account the accents of the word. That is, if I want to search for the word "truck" in the text, I can do it by typing "truck" in the search window....
asked by 27.11.2018 / 05:13
0
answers

Django: Add two DurationField fields

I am creating a project in Django, my model has two fields where I add up the hours of a given activity, in my view I make a query where I sum the total hours of activities per student but I want to add duracion_dft with duracion_dfp, ¿ How can...
asked by 23.06.2018 / 03:44
1
answer

convert query to CakePHP 3.5 [closed]

I need to calculate the ranking of users who have a score. For this I found in another thread the following query that I would need to translate to cakephp format 3.0 or 3.5: SELECT *, FIND_IN_SET(points, (SELECT GROUP_CONCAT(DISTINCT poin...
asked by 14.04.2018 / 18:03