1
1.86 ms
SELECT COUNT (s0_ . id ) AS sclr_0 , SUM (s0_ . total_amount ) AS sclr_1 , AVG (s0_ . total_amount ) AS sclr_2 FROM sales s0_ WHERE s0_ . created_at > = ? AND s0_ . created_at < = ? AND s0_ . status = ?
Parameters :
[
"2026-01-02 00:00:00 "
"2026-01-02 19:43:56 "
"completed "
]
SELECT COUNT (s0_ . id ) AS sclr_0 , SUM (s0_ . total_amount ) AS sclr_1 , AVG (s0_ . total_amount ) AS sclr_2 FROM sales s0_ WHERE s0_ . created_at > = '2026-01-02 00:00:00' AND s0_ . created_at < = '2026-01-02 19:43:56' AND s0_ . status = 'completed' ;
Copy
2
0.47 ms
SELECT COUNT (s0_ . id ) AS sclr_0 , SUM (s0_ . total_amount ) AS sclr_1 , AVG (s0_ . total_amount ) AS sclr_2 FROM sales s0_ WHERE s0_ . created_at > = ? AND s0_ . created_at < = ? AND s0_ . status = ?
Parameters :
[
"2025-12-31 00:00:00 "
"2026-01-01 00:00:00 "
"completed "
]
SELECT COUNT (s0_ . id ) AS sclr_0 , SUM (s0_ . total_amount ) AS sclr_1 , AVG (s0_ . total_amount ) AS sclr_2 FROM sales s0_ WHERE s0_ . created_at > = '2025-12-31 00:00:00' AND s0_ . created_at < = '2026-01-01 00:00:00' AND s0_ . status = 'completed' ;
Copy
3
0.74 ms
SELECT COUNT (* ) FROM products t0 WHERE t0 . is_active = ?
SELECT COUNT (* ) FROM products t0 WHERE t0 . is_active = 1 ;
Copy
4
0.83 ms
SELECT p0_ . id AS id_0 , p0_ . name AS name_1 , p0_ . description AS description_2 , p0_ . barcode AS barcode_3 , p0_ . purchase_price AS purchase_price_4 , p0_ . selling_price AS selling_price_5 , p0_ . stock_quantity AS stock_quantity_6 , p0_ . min_stock_alert AS min_stock_alert_7 , p0_ . unit AS unit_8 , p0_ . image AS image_9 , p0_ . is_active AS is_active_10 , p0_ . created_at AS created_at_11 , p0_ . updated_at AS updated_at_12 , p0_ . category_id AS category_id_13 , p0_ . supplier_id AS supplier_id_14 FROM products p0_ WHERE p0_ . is_active = ? AND p0_ . stock_quantity < = p0_ . min_stock_alert ORDER BY p0_ . stock_quantity ASC
SELECT p0_ . id AS id_0 , p0_ . name AS name_1 , p0_ . description AS description_2 , p0_ . barcode AS barcode_3 , p0_ . purchase_price AS purchase_price_4 , p0_ . selling_price AS selling_price_5 , p0_ . stock_quantity AS stock_quantity_6 , p0_ . min_stock_alert AS min_stock_alert_7 , p0_ . unit AS unit_8 , p0_ . image AS image_9 , p0_ . is_active AS is_active_10 , p0_ . created_at AS created_at_11 , p0_ . updated_at AS updated_at_12 , p0_ . category_id AS category_id_13 , p0_ . supplier_id AS supplier_id_14 FROM products p0_ WHERE p0_ . is_active = 1 AND p0_ . stock_quantity < = p0_ . min_stock_alert ORDER BY p0_ . stock_quantity ASC ;
Copy
5
0.59 ms
SELECT SUM (p0_ . stock_quantity * p0_ . purchase_price ) AS sclr_0 FROM products p0_ WHERE p0_ . is_active = ?
SELECT SUM (p0_ . stock_quantity * p0_ . purchase_price ) AS sclr_0 FROM products p0_ WHERE p0_ . is_active = 1 ;
Copy
6
0.45 ms
SELECT p0_ . id AS id_0 , p0_ . name AS name_1 , p0_ . description AS description_2 , p0_ . barcode AS barcode_3 , p0_ . purchase_price AS purchase_price_4 , p0_ . selling_price AS selling_price_5 , p0_ . stock_quantity AS stock_quantity_6 , p0_ . min_stock_alert AS min_stock_alert_7 , p0_ . unit AS unit_8 , p0_ . image AS image_9 , p0_ . is_active AS is_active_10 , p0_ . created_at AS created_at_11 , p0_ . updated_at AS updated_at_12 , p0_ . category_id AS category_id_13 , p0_ . supplier_id AS supplier_id_14 FROM products p0_ WHERE p0_ . is_active = ? AND p0_ . stock_quantity < = p0_ . min_stock_alert ORDER BY p0_ . stock_quantity ASC
SELECT p0_ . id AS id_0 , p0_ . name AS name_1 , p0_ . description AS description_2 , p0_ . barcode AS barcode_3 , p0_ . purchase_price AS purchase_price_4 , p0_ . selling_price AS selling_price_5 , p0_ . stock_quantity AS stock_quantity_6 , p0_ . min_stock_alert AS min_stock_alert_7 , p0_ . unit AS unit_8 , p0_ . image AS image_9 , p0_ . is_active AS is_active_10 , p0_ . created_at AS created_at_11 , p0_ . updated_at AS updated_at_12 , p0_ . category_id AS category_id_13 , p0_ . supplier_id AS supplier_id_14 FROM products p0_ WHERE p0_ . is_active = 1 AND p0_ . stock_quantity < = p0_ . min_stock_alert ORDER BY p0_ . stock_quantity ASC ;
Copy
7
1.36 ms
SELECT p0_ . id AS id_0 , p0_ . name AS name_1 , p0_ . barcode AS barcode_2 , SUM (s1_ . quantity ) AS sclr_3 , SUM (s1_ . subtotal ) AS sclr_4 FROM sale_items s1_ INNER JOIN products p0_ ON s1_ . product_id = p0_ . id INNER JOIN sales s2_ ON s1_ . sale_id = s2_ . id WHERE s2_ . created_at > = ? AND s2_ . created_at < = ? AND s2_ . status = ? GROUP BY p0_ . id ORDER BY sclr_3 DESC LIMIT 10
Parameters :
[
"2026-01-02 00:00:00 "
"2026-01-02 19:43:56 "
"completed "
]
SELECT p0_ . id AS id_0 , p0_ . name AS name_1 , p0_ . barcode AS barcode_2 , SUM (s1_ . quantity ) AS sclr_3 , SUM (s1_ . subtotal ) AS sclr_4 FROM sale_items s1_ INNER JOIN products p0_ ON s1_ . product_id = p0_ . id INNER JOIN sales s2_ ON s1_ . sale_id = s2_ . id WHERE s2_ . created_at > = '2026-01-02 00:00:00' AND s2_ . created_at < = '2026-01-02 19:43:56' AND s2_ . status = 'completed' GROUP BY p0_ . id ORDER BY sclr_3 DESC LIMIT 10 ;
Copy
8
0.47 ms
SELECT COALESCE (SUM (s0_ . total_amount ), 0 ) AS sclr_0 , COUNT (s0_ . id ) AS sclr_1 FROM sales s0_ WHERE s0_ . created_at > = ? AND s0_ . created_at < ? AND s0_ . status = ?
Parameters :
[
"2026-01-02 19:43:56 "
"2026-01-03 19:43:56 "
"completed "
]
SELECT COALESCE (SUM (s0_ . total_amount ), 0 ) AS sclr_0 , COUNT (s0_ . id ) AS sclr_1 FROM sales s0_ WHERE s0_ . created_at > = '2026-01-02 19:43:56' AND s0_ . created_at < '2026-01-03 19:43:56' AND s0_ . status = 'completed' ;
Copy
9
0.62 ms
SELECT s0_ . id AS id_0 , s0_ . invoice_number AS invoice_number_1 , s0_ . total_amount AS total_amount_2 , s0_ . amount_paid AS amount_paid_3 , s0_ . payment_method AS payment_method_4 , s0_ . status AS status_5 , s0_ . customer_name AS customer_name_6 , s0_ . customer_phone AS customer_phone_7 , s0_ . notes AS notes_8 , s0_ . created_at AS created_at_9 , s0_ . cashier_id AS cashier_id_10 FROM sales s0_ ORDER BY s0_ . created_at DESC LIMIT 10
SELECT s0_ . id AS id_0 , s0_ . invoice_number AS invoice_number_1 , s0_ . total_amount AS total_amount_2 , s0_ . amount_paid AS amount_paid_3 , s0_ . payment_method AS payment_method_4 , s0_ . status AS status_5 , s0_ . customer_name AS customer_name_6 , s0_ . customer_phone AS customer_phone_7 , s0_ . notes AS notes_8 , s0_ . created_at AS created_at_9 , s0_ . cashier_id AS cashier_id_10 FROM sales s0_ ORDER BY s0_ . created_at DESC LIMIT 10 ;
Copy