I need to know why you answer me as I need a query, I have a table of medical data and another of patients where two strings called id are not referenced or anything.
my medicals table.
+--------------------------------------+---------+----...
Good afternoon,
This question would be the next step to the question asked in " Doubt in complex grouping sql " and that a solution was already obtained.
I summarize it and indicate the new question.
I have a table with tickets like this,...
Hello gentlemen, I'm looking for Export the Tables of a DB (No matter the engine, I care that you can) to an Excel with one sheet per table .
Example: a single file called gastos.csv that inside contains a sheet for each table that...
I want to do a DISTINCT but only apply in a column because I consult two things, an ID and an image and I just want you to show me an image of that product.
I try to keep it that way.
| producto | imagen |
|----------|--------------...
I am programming a script in php and I have created the following query:
SELECT t2.id_usuario, t3.nombre, to_char(t1.fichaje_fecha, 'YYYY-MM') AS mes
,SUM(CASE WHEN t1.operacion = '+' THEN t1.tiempo ELSE '00:00:00' END ) AS "positivo"
,SUM(CAS...
I have the following query in Laravel through query builder:
$objective_risk = DB::table('objective_risk')
->join('objectives','objectives.id','=','objective_risk.objective_id')
->join('risks','risks.id','=','...
A client sent me their database in which dates are included, however they come with a YYYYMMDD format, and I would like to create a "query" where I can insert the "/" delimiter in that column so that it remains this way YYYY/MM/...
How about people, I hope you can help me solve this problem even if it's silly, I'm trying to create a table with an Identity type ID and I'm getting the following error:
Error que empieza en la línea: 1 del comando :
CREATE TABLE USUARIO (
us...
I have a database file SQL that I want to access from a Java class that makes the connection to DriverManager and JDBC , but I'm a bit lost.
the file is called items.sql
DBItem.java
package beans;
import java.sql.*;...
I need to make an annual consultation grouped by months of all registered users in the period of one year. The query would be the following:
SELECT
COUNT(*) AS total_users,
YEAR(created_at),
MONTH(created_at)
FROM
'users'...