How can an associated query get the following results from table 3?

for example, there are three tables below

clipboard.png

t1ridt2t3

clipboard.png

try the following statement

SELECT
    t1.rid,
    t1.col1,
    t2.col2,
    t3.col3 
FROM
    t1
    LEFT JOIN t2 ON t1.rid = t2.rid
    LEFT JOIN t3 ON t1.rid = t3.rid

will get the result of rid=3. How should I write this SQL

?
Nov.15,2021

add a condition where not (t2.col2 is null and t3.col3 is null)

Menu