The first query returns 2 tuples so p = 2 and the second query returns 0 tuples because num1 <> 100 doesn’t return the row which has num1 value as NULL because we can’t compare the NULL values like this it results in unknown so q = 0,
so final answer we get is 20.