SQLite COUNT() with Distinct Function
It counts only the unique and non-null values. Unique values are nothing but the not repeated values.
Query:
select count(distinct dept) from faculty;
Output:
Explanation: As, we know there are three different departments they are cse, ece, eee and there is a null value for the dept column where Id is equal to 5. From the distinct function we have learned that It only counts the unique and non-null values and, such the ouput we got as 3.
SQLite COUNT
SQLite is a serverless database engine, it is written in C programming language and is easy to use and store the data. It is one of the most used database engines. It is widely used for the development of Embedded applications. In this article we will learn about the SQLite count, how it works and what are all the other functions that are used with SQLite to get the desired output.