I have the following query:
SELECT rp.colaborador as codigo_, t.nome, count(rp.*) as presencas,
((100 * (select count(rp.*) from empresa.cad_reuniao_presencas rp
join empresa.cad_terceiros t on t.codigo = rp.colaborador
join emp...
I have the following code:
<select>
<optgroup label="fruta">
<option value="banana">banana</option>
<option value="uva">uva</option>
</optgroup>
<optgroup label="l...
I have a table where records are saved every 3 seconds 24 hours a day
Table: myTable
dado1 dado2 dado3 data
"135,05" "134,69" "135,10" "2018-11-13 15:38:16"
"132,00" "131,91" "132,61" "2018-11-13 15:...
I'm trying to do the conversion from a select sql server to the Dapper, as it was too big, I'm wanting to make it leaner and readable ...
But this error appearing in some parts
SELECT
email.assunto [Assunto],
disp.cod_disparador [Dispa...
I have an array that will be variable, eg $ ref = array ('123', '654', '555').
I wanted to do a SQL query to bring information from these references, something like:
SELECT *
FROM tabela_itens
WHERE ref = (array do PHP)
How can I do th...
Is there a way to use WHERE to make a SELECT with INNER JOIN ?
My case is this:
SELECT CodCli, NomeCli
FROM tbvendas
INNER JOIN tbclientes
ON tbvendas.CodCli = tbclientes.AutoCod
I would like to put a WHER...
I need to make a query that returns a column with the amount of requests the customer made within the period spent in WHERE and together with another column with the total number of requests that the customer has made so far. More or less like t...
I have a table of items, request_itens, interested (it has auto relationship, it is used for secretary, sector and employee, and a requested table), in the order table I have 3 foreign keys (one for secretariat, another for sector and one more f...
I have a table in the database called emails , with the following fields:
id
subject
body
e status (0, para não enviado, ou 1, para enviado).
I was doing a query to retrieve only the rows that have status 1, my SQL query was:
"SE...
I'm doing an INNER JOIN from the Combo Table with the Product Combo Table as I show below ...
SELECT C.SchoolID, C.ComboID, P.Active, P.Name, P.ProductID
FROM sales.Combo AS C
INNER JOIN commons.Stock AS S ON C.SchoolID = S.SchoolI...