You only have one table so there is nothing to join on.
In your current query you have no need to use a sub query .Your query should be :
select name from session1 where id <>21
To find “I have a table session1 and need to find only new entries who logged in with specific id.” You can use this query :
select name from session1 where id in (20,21)
4
solved Solve the query using join?