First of all,
Working specifically with Java in the Backend using WebServices Rest and PostgreSQL, after some professional enhancements I was directed to pass ordering and paging of my application to SQL, which would overload the application ser...
I have a column called data , which has, for example, this JSON
[{"name": "unit", "value": "2", "validator": ["required"]}, {"name": "name", "value": "teste", "validator": ["required"]}]
I need to make a SELECT that...
Hello,
I am in the following situation:
I need to select the amount of care of people of some age groups and of those who are male and female.
I have the following tables: cadastro (id, natendimento, data, sexo, fokfaixaetaria) and fa...
I have the following code: (it is from a table that the representatives have the same code, which generates duplicate values, I solve this by picking the most current representative, in short the last face that synchronized) / em>
select dist...
Suppose the following table that records author posts in a blog.
An author can have several posts.
So I have several reps of authors on this table of the different posts he made.
How do I make a query to fetch the content of the most re...
I have two tables in MYSQL:
account:
id apelido_usuario
1 caio
2 manoel
3 josé
product
idconta status
1 3
1 3
1 1
2 3
3 2
I made a SELECT like this:
SELECT * FROM conta
WHERE apelido_usuar...
I have this query that looks for birthdays of the month:
$mesHoje = date("m");
$sqlAni = $pdo->prepare('SELECT * FROM aniversario WHERE MONTH(dia) = :mesHoje ORDER BY dia ASC');
$sqlAni->execute(array("mesHoje" => $mesHoje));
How d...
Friends, what is first processed in SQL Select? The "Order by" or "Limit"?
For example, if I have a table with multi-state cities. Then I look for cities with more than 100 thousand inhabitants of state X, resulting in 6 cities (eg cities lis...
I'm trying to sort a query in the database by grouping the information, however this is showing the first one registered in the database, but I want the last.
SELECT *
FROM base_rating AS B
JOIN historico_rating AS H ON B.id = H.id_base_rating...
I have the following Query that results in joining the total sum of an account and the plots
select
sum(total) as total,
datavencimento
from (
select
sum (con_valoraserpago) as total,
to_char(con_datavencimento...