To obtain a count from specific columns while disregarding the rest, you can use the SELECT statement to specify the columns you want to include in the count, and then use the COUNT() function to count the number of rows that meet your criteria. For example:
SELECT COUNT(column1), COUNT(column2) FROM table_name;
This will return a count of the number of rows in the table where the values in column1 and column2 are not null. Any other columns in the table will be ignored.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-08-06 11:00:00 +0000
Seen: 13 times
Last updated: Oct 08 '21
How can the columns be transformed into a multi-level structure?
How to arrange columns in a Flutter datatable?
What are the steps to utilize a for loop for generating and populating columns?
Is it possible that there are some missing values when combining across columns?
How can the precision be varied across different columns in pandas?
What does the "Undefined Columns Selected R error" mean when using the PPRL package?