Hello friends of the community. I need to fill a chart but I can not mount the query to receive the attributes, could anyone help me? The query I need to do is the following.
select client.name, count(*) as Tickets
from client, ticket
where...
I have the following query:
SELECT
DATEDIFF(hh, MIN(BATIDA), MAX(BATIDA))AS HORAS
FROM ARELBATIDATRANSITOVIEW
WHERE CHAPA = 3187
AND BATIDA IS NOT NULL
AND SEQUENCIALBATIDA IN (2,3)
GROUP BY DATA
ORDER BY DATA DESC
Example:...
Talk about the person!
I am inserting a time (hour: minutes: seconds) into an x column, would you like to know if it is possible to add the current value of the line with the next value that is entered? as if it were a + =. For example: One l...
// Modelo Cliente
public function plano()
{
return $this->hasManyThrough('App\Plano', 'App\Plano_cliente','cliente_id','id','plano_id');
}
//Modelo Plano
public function cliente()
{
return $this->hasMan...
There is a query in my PHP where I search the mailing list and return to PHP, however, it is not returning any results.
Code PHP looks like this:
<?php
session_start("admin");
if($_SESSION["admin"] == "on"){
inclu...
I have a very crazy problem that has already burned my logic ability.
Some time ago I asked a question almost the same as this one but they helped me a lot (thank you very much) but my need has changed and now I have another table and my quer...
Good morning guys, how are you?
I have a performance problem on a system and need to solve customizing a SQL.
Let's imagine the following scenario:
- A table with millions of records, each record has an ID (PK) and a TIMESTAMP.
I curr...
I have a procedure and a COMMON TABLE EXPRESSION (subquery).
This my CTE does a search and offers to my query the result, my query then uses the results of it.
In my Address table I have a "Complement" field that allows null values.
However w...
I have a problem, I do not know if I'm doing it right, but come on.
I have a table that lists some employees (tblTecnicos).
I have another table, which has the service registers that these technicians performed (tblServices), in this table...