Questions tagged as 'query'

2
answers

inner join without duplicates

I'm doing a system in php in which I have two tables in one save the records and in another the boxes where each record goes, the result is this way -------- -------- --------------- CASILLA SECCION REPRESENTANTE -------- -------- -...
asked by 15.06.2017 / 22:46
2
answers

Get values with like mysql

I need to make a query that returns only one result, it is the following: among my records I have a field called name and I want the query to return the name that contains cumla with the following: If I say "hello" and in the registers I ha...
asked by 09.05.2017 / 19:34
2
answers

Group or Count SQL Server repeated values

This query brings me the information correctly with the difference that it brings me the duplicates, so what I want to do is another column where you tell me how many times the same number is repeated in this case the repeated ones are here (E.N...
asked by 29.08.2018 / 21:34
1
answer

Query Mysql Product Category Subcategory

I have this relationship: And I would like to make the appropriate consultation that the Products that belong only to a Subcategory, of a specific category, would throw at me. If you could help me, I'd appreciate it, I'm going around...
asked by 27.10.2018 / 02:34
1
answer

What is the use of & gt and the & lt in a native query?

I have the following native query but I do not know what it means or what it does & gt, & lt <query> SELECT ID, ID_BASE, NOMBRE, RFC, NOMBRE_CLAVE, FEC_REGISTRO, FECH_PRINCIPAL FROM FACTURA F WHERE F.ID_BASE=?1 AND F.FEC_RE...
asked by 12.07.2018 / 05:35
1
answer

Generate Query in Web Service Java

I have a Restful web service in Java, I have been able to do CRUD transactions without any problem, but the challenge I have encountered is how to do inner join and filters in a query. I have something like this: @GET @Path("buscar") @Produces...
asked by 19.04.2018 / 02:46
2
answers

How to get two fields from the same table in SQL through a query

What I want is to get from the same vista or consulta two fields of the same column but with different value, this means that I must recover two different values within a same column, one value is old or obsolete and the other valu...
asked by 03.03.2017 / 17:22
1
answer

What kind of queryset can I do, to order type of strategy in conservative, moderate and risky?

This is my class: class FirFondoDistribucionAdmin(admin.ModelAdmin): """ Administrador de las distribuciones de dichos fondos """ list_display = ('fondo', 'tipo_distribucion', 'porcentaje', 'is_activo', 'fecha') admin.s...
asked by 03.07.2018 / 18:46
2
answers

How to bring data without registration in an sql query? [closed]

In a query sql would like to bring users who are not registered in a defined group, EXAMPLE: I have 10 registered users in my database, but of those 10 there are 5 registered in the GRUPO1 , the idea is to show the other 5 that a...
asked by 18.01.2018 / 18:51
1
answer

Group and add in mysql. to create a report

I have the following table and I want to Group and add as in the following example that I put to you. I commented that this table I will have in a view since it is the result of several tables. =) DESIRED RESULT ... I do...
asked by 23.01.2018 / 06:13