SQLite Forum

Mismatch in query results
Login
I have a DB with tables 'artists' and 'cds' to manage my music collection. But I get 2 different results depending on these 2 queries:

    select count(*) from cds where genre like '%jazz%';
    1103
    select count(*) from cds inner join artists on artists.artistid=cds.artistid and cds.genre like "%jazz%";    
    1101

Schema:

CREATE TABLE IF NOT EXISTS "artists" (
`id`	integer NOT NULL,
`artistid`	integer,
`name`	text,
PRIMARY KEY(`id` AUTOINCREMENT)
);

CREATE TABLE IF NOT EXISTS "cds" (
`id`	integer,
`artistid`	integer,
`cdid`	INTEGER,
`title`	text,
`runtime`	text,
`notes`	text, 'genre' text,
PRIMARY KEY(`id` AUTOINCREMENT)
);

How can I determine which 2 records are missing?