Category "count"

get the name of product with the maximum number of orders

I have 2 tables orders and product as orders has only one field (order_id) and the products have a reference to the order_id, how to get the name of product wit

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

The code was working perfectly until when I installed XAMPP 8 (PHP 8). if(isset($_POST["submit"])){ @$subject = $_POST['subject']; @$term = $_POST['term

Is there another way to write SUM(IIF([CONDITION], 1, 0))?

What SUM(IIF([CONDITION], 1, 0)) does is very simple. So simple, that what I really just want to write is COUNT([CONDITION]) (but that's invalid). Is there a sh

SQLITE PIVOT TABLE WITH COUNT

Can you help me plase ? I want a result like the table below with Sqlite . task_name status_code department 1 A START PUR 2 B START ENG 3 C FINISH ENG 4 D NOT

sqlite mark duplicates with true or false

I need to create a new column in my dataset (duplicate_name) that contains TRUE if there are more than one record for someone or FALSE otherwise. I found this c

Codewars Challenge - Count of positives / sum of negatives

My code works but it's not being accepted in order to pass the challenge. Any help on what I'm doing wrong would be appreciated. Challenge Description: Given

Read text file and look for certain words from key word list

I am new to Python, and I am trying to build a script where I import text_file_1 that contains a body of text. I want the script to read the body of text, and l

How do I select the count of records, then group them by a foreign key?

I have two tables: Products and Suppliers. SupplierID is a foreign key in products table. I need to make a table that contains country, supplierID, company name

Postgresql Multiple counts for one table

From two columns in my table I want to get a unified count for the values in these columns. As an example, two columns are: Table: reports | type