ORY
ORY

Reputation: 413

Sqlite query Select only when equals two values

"SELECT ? FROM TableSales....

I have two Columns, one is for Manufacturer and the other one is for Model. I want to count how many times they exists in the table. The problem is to use a filter which only counts those, where the Manufacturer and the Model column are equal. Cause it could happen that the Model Column or the Manufacturer Column are equal but not both together.

Upvotes: 0

Views: 108

Answers (1)

FBidu
FBidu

Reputation: 1012

It seems to me that you can accomplish the task with this code:

SELECT COUNT(*) FROM TableSales WHERE Manufacturer == Model

Upvotes: 1

Related Questions