Query in two tables with SQLITE [closed]

0

I have a question, I have two tables one is called Factura containing

ID_FACTURA,
ID_CLIENTE, 
TOTAL,

I have another table called Detalle contains the columns

ID_FACTURA,
ID_CLIENTE,
FECHA.

What I need is to make a query in which you get from the table Factura the ID_FACTURA the TOTAL and you get the FECHA of the table Detalle I have this code but I get an error

SELECT FACTURA.ID_FACTURA,FACTURA.TOTAL
FROM FACTURA
INNER JOIN DETALLE
ON FACTURA.ID_CLIENTE = DETALLE.ID_CLIENTE
WHERE ID_CLIENTE = 1 
    
asked by oscar garita 13.11.2017 в 03:37
source

1 answer

2

The answer should be included in this section and not in the comments so that other users who look for something similar can easily see it. Consider marking this as the correct answer so that the rest can easily see it.

SELECT FACTURA.ID_FACTURA,FACTURA.TOTAL,DETALLE.FECHA FROM FACTURA INNER JOIN FACTURA.ID_FACTURA = DETALLE.ID_FACTURA WHERE FACTURA.ID_CLIENTE = 1 
    
answered by 13.11.2017 в 08:49