sqlite> create table flags (
...> id INTEGER,
...> name VARCHAR NOT NULL,
...> descr VARCHAR DEFAULT NULL,
...> type_id INTEGER NOT NULL,
...> live INTEGER NOT NULL DEFAULT 1,
...> package_id INTEGER DEFAULT NULL,
...> FOREIGN KEY (type_id) REFERENCES flag_types(id),
...> FOREIGN KEY (package_id) REFERENCES packages(id),
...> CONSTRAINT idx1_unq UNIQUE (name, descr, package_id),
...> PRIMARY KEY (id)
...> );
sqlite>
sqlite> select * from flags where name='x86' limit 2;
7647|x86||1|0|
7648|x86||1|0|
sqlite> select package_id from flags where name='x86' limit 2;
sqlite> select count(id) from flags where descr is NULL and name='x86' and package_id is NUll;
598
sqlite>
почему строчек с "x86" так многобольше одной?