I need to get the total value of the VOL field (image below), it is already generated by the SUM function. It can be in another query. All periodic tithe is required.
ex: total = VOL (7.6890028) - > sum of the 4 lines of column VOL...
I have the following select:
SELECT a.nome, a.cidade, a.telefone, a.dt_criado
FROM cadastro AS a
GROUP BY a.nome, a.cidade, a.telefone, a.dt_criado
HAVING COUNT(*) > 0
ORDER BY a.dt_criado
DESC
a.dt_create...
In this select I am bringing all the employees who accessed the application yesterday PO.DAT_COLETA and who performed yesterday PE.COD_PEDIDO . But I also want to bring those who accessed yesterday and did not make sales, today I do...
I am using SQL Server and need to query on a table the latest price record according to the date. Of all the records, I need him to bring me only 1 and with the current date. How do I do this?
I want to make a select that brings the data of note of each student, grouped by student and matter, but I want only the result of the last test of each matter. For example a student can take the English test 3 times, and math twice, in t...
I need to retrieve the quantity of product with price between 0 and 10. There is an error in the @W_NUM variable of the select command.
BEGIN TRANSACTION;
DECLARE @W_P1 int;
DECLARE @W_P2 int;
DECLARE @W_NUM int;
set @W_P1=0;
SET @W_P2=10;
SET...
I have the following problem;
I'm trying to do a search and include the value of the WHERE principal in a sub-select , however the result is always reported as 0,
Part of the query I'm having difficulties is this:
SELECT
(...
I have a little question that I can not solve, I searched the community here, but I did not find exactly what I wanted.
My situation resembles the following: I have N product records in my database. And in these N records, I have only 3 diffe...
I have a populated table and need to generate the scripts of insert of the data stored in it, I can not export, it must be script of insert into ...
Doing with select concatenating is very laborious, since I h...
I am developing a commercial automation system (C # and Windows Forms) that can be installed on one or more machines on the same local network.
I've also done the mobile part of the system, where you can place requests through any device th...