Skip to content

Where clause on count column

I have two tables pdc and class select roll_no as roll,sum(pdc.amount) as amount,count(amount) as given, stu_profile.name,f_name,scholarship,class_id,batch_id,statuss from stu_profile left …

SQL: Running Total of Occurrences

I am using Metabase with a PostgreSQL implementation. I’d like to achieve the outcome in the photo. I wish to include a column that counts how many times a field has occurred above. It should include the current instance as well. Other examples I’ve seen have simply counted total occurrences. As I…

Dapper query with dynamic list of filters

I have a c# mvc app using Dapper. There is a list table page which has several optional filters (as well as paging). A user can select (or not) any of several (about 8 right now but could grow) filters, each with a drop down for a from value and to value. So, for example, a user could select category