Joining two tables and query them I want to select the name and date of birth of all living artists who have value more than 50. My tables are artist and picture and I wrote this SQL statement but it is not giving me the desired result. Please advise.

SELECT name, dateOfBirth
FROM artist 
    JOIN exhibitions.picture
        ON exhibitions.picture.name
WHERE exhibitions.picture.value = '50'
    AND artist.dayOfDeath is NULL;
Assuming that value is a numeric data type:

SELECT 
    A.name
    , A.dateOfBirth

FROM
    artist A
    JOIN exhibitions.picture P
        ON A.name = P.name

WHERE
    P.Value &gt; 50
    AND A.dayOfDeath is NULL;