Skip to content
DbaFix
Just share answer and question for fixing database problem
MENU
  • HOME

Tag: pivot

Pull data from multiple tables in a view or function

By adminPosted on March 28, 2023

Question : There are 3 tables from which I need to pull data, and print it in a specific way. […]

Convert Rows to columns using ‘Pivot’ in SQL Server when columns are string data type [duplicate]

By adminPosted on March 14, 2023

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

By adminPosted on March 14, 2023

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?

By adminPosted on March 13, 2023

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

By adminPosted on March 7, 2023

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

By adminPosted on March 5, 2023

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?

By adminPosted on March 2, 2023

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

By adminPosted on February 20, 2023

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

By adminPosted on February 20, 2023

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

By adminPosted on February 15, 2023

Question : Is it possible to crosstab a table in PostgreSQL without having to define an “as” clause given by […]

  • 1
  • 2
  • 3
  • …
  • 25

Recent Posts

  • Referencing database programmatically via T-SQL
  • How to set roles and users with correct permissions on Postgres? [closed]
  • SQL query optmization [closed]
  • Is it possible to optimize this query? Currently taking days (no sign of stopping) on ~11 million records
  • We use MongoDB 3.6 community version, How can i get the number of hits on single collection as well as bandwith usage?
  • Will too many tables slow Mysql down?
  • Group By hour over large dataset
  • “Force Encryption” vs “Force Protocol Encryption” in SQL Server
  • Mysql checksum for master-slave replication returning different values, despite being identical
  • Same record shows up multiple times in ordered paginated query
  • Allow users to only view the databases they have access to
  • Does ALTER on PostgreSQL, Oracle table (respectively) create intermediate copy of the table?
  • Delete rows from a large table with joins and aggregating (resulting in 1 % less rows in the big table)
  • How to record sqlplus session activity like “/var/messages” in Unix..? [closed]
  • Mysql dump with View dependent on user
  • How does Oracle know who I am?
  • Filter a SQL replication
  • Return values from Left Table Only Once
  • Get the list of all Tables, Views, Stored procedures that are not added in a publication for replication
  • Optional oneToOne relations and criteria field

Categories

  • Database Backup
  • Database Design
  • Database Index
  • Database Optimization
  • InnoDB
  • Join
  • MariaDB
  • MongoDB
  • MySQL
  • Oracle
  • Performance
  • Permissions
  • Postgresql
  • Query Performance
  • Replication
  • Security
  • SQL Server
Proudly powered by WordPress / Support by: DizzyCoding