Questions tagged as 'query'

0
answers

RavenDB - How to query words by ignoring the accent

I need to do a person name query by ignoring the accent. Ex: In my document I have a record with the name "Letícia". If I consult for "leticia" the result comes empty. The behavior I need is to find the person even though the query is without...
asked by 18.07.2017 / 19:01
1
answer

Error query pdo (Sort by count) [closed]

I'm trying to make a ranking based on the amount of coins in each. In descending order. I used this query in pdo: $ranking = $pdo->query("SELECT * FROM usuarios WHERE banido='false' GROUP BY usuario ORDER BY count(moedas) DESC LIMIT 3");...
asked by 29.06.2017 / 20:51
0
answers

How to display decimals only when they exist?

How could I do so that in my select the numbers would appear without decimal place when they are 00 and the decimal places appeared when they are different from zero. Example: I have 5 numbers returning like this: 16.00; 10.00; 3.14; 5.00; 13...
asked by 14.06.2017 / 23:15
1
answer

Limit and Offset for web paging in SQL Server

I'm working with PHP and I have about 8000 records currently in DB. As it is for a web page, I need to make a pagination to be viable reading the data. As I understand it, I have to do something similar to limit and offset to...
asked by 28.11.2016 / 13:35
3
answers

Doubt SQL Query Business Days

Good evening! Well, I need to know the following result. I want to bring the workdays grouped by month and year from April to June of this year of 2017. Example: Ano Mês Dias Uteis 2017 Abril 19 2017 Maio 18 2017 Junho...
asked by 01.07.2017 / 04:12
0
answers

How to use subqueries with LINQ Entity Framework?

I need to write the following query in the Linq Entity Framework. I'm having difficulty in the subquery part, where I need to accumulate the quantity field. SELECT ppc.[PedidoCompraId] ,ppc.[EAN] ,ppc.[Preco] ,ppc.[Quantidade] ,ppc.[Un...
asked by 26.04.2017 / 20:19
1
answer

How to bring a List in a JPQL query with constructor

Good afternoon, I am doing a jpql query to bring a VO (Value Object) with some information, one of which is a List . This list is in the opCambio object, however, it is returning this error: Log: [ERROR] - 01/04/2017 19:16:26 - Run...
asked by 20.03.2017 / 17:31
1
answer

Create select with various conditions

I have a table with several connections record and I need to make some conditions to separate records. I already use select to validate information SELECT count(*) as qtdade_status_dia, "TB_BASE_ACIONAMENTO".contrato || "TB_BASE_A...
asked by 07.03.2017 / 20:23
1
answer

Is there a way to join 2 queries of distinct tables in a single query?

I would like to know if there is a way to join 2 queries of different tables in a single query? For example, in the code below I have 2 queries in separate tables. However, is there a way to perform these 2 queries as a single, one at a time,...
asked by 23.02.2017 / 15:20
0
answers

How to join 3 queries of different record amounts?

I need to merge 3 queries with results and quantities of different records into a single query, using the Where end of the script as where for all queries . How can I do this? I have tried Union , but it does not run, displaying error...
asked by 17.02.2017 / 15:46