Consult in 2 tables with conditions in 1


I have 2 tables:
In the first (A) the following data:

nombre      fecha     estado
 Ariel        12         2
 Pablo        X          1

Second table (B)

nombre      deporte
Ariel       Futbol
Pablo       Basquet

I need you to ask about the first table who has date = X and state = 1, but at the same time know the corresponding sport to this from the other table.

The result would be:

nombre      fecha     estado    deporte
Pablo         X          1      Basquet

I was testing with Inner Join. I know it must be easy but something is blocking me. I would greatly appreciate your help.

asked by Javier Montoliu 13.11.2018 в 18:25

0 answers