Question : There are 3 tables from which I need to pull data, and print it in a specific way. […]
Tag: pivot
Convert Rows to columns using ‘Pivot’ in SQL Server when columns are string data type [duplicate]
Question : This question already has answers here: Dynamic pivot: sum of sales per month (2 answers) Closed 6 years […]
Using different aggregate functions in a pivot
Question : I have a table of data collected in the time as shown below. I would pivot them using […]
Oracle Discoverer like app native for SQL Server?
Question : Can someone point me at some web based apps that work like Oracle Discoverer but native for SQL […]
SQL sort by sum of two different where clauses in a join
Question : table1 ID | Name 1 ID1 2 ID2 3 ID3 table2 ID | table1ID | Values 1 1 […]
How do I get the row as column and one of the column as rows under the first column data
Question : I have table like below: Tname Scode —– —– SVC code1 SVC code2 SVC code3 AKV code1 AKV […]
How can I pivot this data using a cte or the pivot syntax?
Question : Let’s say I have these two tables in an MSSQL-Database: Is there any way to create a query […]
Join tables with same keys, second table has multiple values for key
Question : I have two tables with shared keys and I’m trying to join them and output the results to […]
Default values for crosstab results
Question : I’m trying to write my first crosstab query in Postgres. Some of the results have no entries and […]
Pivot table in PostgreSQL by pivoting 10~20 values in a column
Question : Is it possible to crosstab a table in PostgreSQL without having to define an “as” clause given by […]