Daniel Wakefield
04/05/2023, 10:25 PMJakub Sterba
04/05/2023, 11:44 PMselect count({attribute/product_id},{dataset/products}) - count({attribute/product_id},{dataset/orders})
- number of unique primary keys in dataset “products” minus number of unique foreign keys in dataset “orders”
2. select count({attribute/product_id}) where (select count({attribute/order_id}) by {attribute/product_id} for each {attribute/product_id})=NULL
- calculate number of orders for each product (products without orders will be represented by NULL value because of applied outer join using FOR EACH keyword) and use it to filter the counted products.Daniel Wakefield
04/06/2023, 7:12 PMDaniel Wakefield
04/06/2023, 7:25 PMDaniel Wakefield
04/06/2023, 7:26 PMJakub Sterba
04/06/2023, 7:32 PMDaniel Wakefield
04/06/2023, 7:36 PMDaniel Wakefield
04/06/2023, 7:38 PMJakub Sterba
04/06/2023, 7:40 PMDaniel Wakefield
04/06/2023, 7:42 PMDaniel Wakefield
04/06/2023, 7:43 PMJakub Sterba
04/06/2023, 7:44 PMDaniel Wakefield
04/06/2023, 7:44 PMJakub Sterba
04/06/2023, 7:44 PMDaniel Wakefield
04/06/2023, 7:47 PMJakub Sterba
04/06/2023, 7:49 PMDaniel Wakefield
04/06/2023, 7:53 PMJakub Sterba
04/06/2023, 7:55 PM(select min({label/disconnected_date.day},{dataset/disconnected_dataset}) by all other)
with dashboard date filter applied as range of days of disconnected date dataset.Jakub Sterba
04/06/2023, 7:57 PMDaniel Wakefield
04/06/2023, 8:02 PMselect count({attribute/product_id}) where (select count({attribute/order_id}) by {attribute/product_id} for each {attribute/product_id})=NULL
?Jakub Sterba
04/06/2023, 8:04 PMselect count({attribute/product_id}) where {label/product_date.day} between {metric/start} and {metric/end} and (select count({attribute/order_id}) by {attribute/product_id} for each {attribute/product_id} where {label/order_date.day} between {metric/start} and {metric/end})=null
Jakub Sterba
04/06/2023, 8:05 PMDaniel Wakefield
04/06/2023, 8:08 PMJakub Sterba
04/06/2023, 8:13 PMJakub Sterba
04/06/2023, 8:15 PMDaniel Wakefield
04/06/2023, 8:21 PMDaniel Wakefield
04/06/2023, 8:27 PMJakub Sterba
04/06/2023, 8:29 PMDaniel Wakefield
04/06/2023, 8:31 PMJakub Sterba
04/06/2023, 8:33 PMDaniel Wakefield
04/06/2023, 8:35 PMJakub Sterba
04/06/2023, 8:38 PM