I have these four tables related to each other (ignore the relationships that go upwards).
I will use a query so that you can understand the problem, which is complex:
SELECT u.nombre, COUNT(fr.id_tipologia), t.nombre
FROM tipologias...
Starting from two tables
lessons
lessons.lessons_id, lessons.lesson_number, lessons.course_id entre otras
and lessons_completed
lessons_completed.lessons_number, lessons_completed.user_id,
lessons_completed.completed
With the...
It turns out that I have a problem I want to show the name of tables related to inner join in Codeigniter but it does not let me not know what I'm doing wrong.
Controller
public function consulta() {
$asociados = array("tablaAsoci...
I have two Income and Periods tables, within the Periods table are the months from January to February and in Income I have a value_port column in which there are records for what has been contributed in each month.
ex.
Ingresos
Periodo Valor_...
I have 6 survey tables, form_alumnos, dimension, questions, answer_type, answer.
Table form_alumnos
and I have this query
SELECT p.id_pregunta, tr.tipo, COUNT(r.id_respuesta) as cantidad_respuestas
FROM encues...
I'm having problems selecting data from different tables, I explain.
I have three tables and I occupy certain data of each of them:
usuarios AS u
u.id u.usuario
proyecto_emp AS p
p.id_proyecto p.us_id p.rol
roles AS r
r.id r.rol...
I have this query:
$customers_query_raw = "select ex.codigo_op, ep.entrega01_clave, ep.descripcion_articulo, ep.entrega01_envases, ep.entrega01_importe from " . TABLE_EXPORT_PATRIMONIO . " ep left join " . TABLE_EXPORT_COMPARATIVA_PATRI . " ex...
I need to do a left join in MySql and it's not working. I have 4 tables: articulos , subcategoria , categoria and ventas . I want to show all the independent items that have sales or not.
Each article has a sub...
I'm writing to see what's wrong with this query:
Name of the teacher who teaches all subjects first
select
nombre
from profesor inner join imparte on (profesor.p# = imparte.p#)
group by nombre
having (curso like "primero")
I'm doing an app with express, mongoose, and socket.io. My intention is to make that when a user enters, he joins a room whose name is the name of the city with which he registered. The idea is that when a user A and B belong to the same city,...