How can I create summaries across columns?

I have an existing application database table supporting an application, and I’ve been tasked with adding another feature. Currently, we have a build table that stores information about product builds….

How to keep column name after sum aggregation in SQL query

I am querying SQL Server where I have multiple columns with sum aggregation. I’m wondering if there is a way to keep column name after doing sum over each of them. I want to avoid using aliases …

Postgres SUM over given time

I am trying to SUM google analytics data over a given time using Postgres. I am not quite sure how to get around a grouping issue. The query you see below returns one column per day. I want to SUM all …

postgres sql query to convert group by result in multiple columns

I have two tables financial_account having columns account_name financial_transaction having columns transaction_date,transaction_type, transaction_amount I need data as SUM(transaction_amount) …

SQl Query to get an output that resembles the image [closed]

I would like to get output the way its shown in the image attached and the way the input is organized is also shown in the image attached. Thanks!

Max and Avg debt days over a period of time

I have invoices pending payment, every invoice has two dates, first when the invoice is required to pay and the other when the invoice is paid. I want to know in a period of time the max debt and the …

How to multiply all values in one column to make one number?

In SQL Server, I am trying to multiply all values of a calculated column in a table in descending date order, to produce one number. This is so I can calculate a factor that can be applied to a …

convert access group by query to sql server query

I’m unable to convert MS Access query to SQL SERVER Query, with changing the group by columns because it will effect in the final result. The purpose of this query is to calculate the Creditor and …

SQL group and summing at new row

I have an issue where I am trying to create a new “row” (not part of the database) where it only gives me the SUM of the “count” column. I am wondering if that is possible? I tried …

SQL Server Sum specific transaction type amounts

I have a temp table (#general) that contains Account number, transaction type, Amount info as below AccountNumber Tran_Type Credit 96551AQ6 TSCNYAEUQF 0.0000000 96551AQ6 TSCNYAEUQF …