Skip to content
Advertisement

Tag: pivot

Pivot on Multiple Columns using Tablefunc

Has anyone used tablefunc to pivot on multiple variables as opposed to only using row name? The documentation notes: The “extra” columns are expected to be the same for all rows with the same row_name value. I’m not sure how to do this without combining the columns that I want to pivot on (which I highly doubt will give me

Dynamic Pivot Columns in SQL Server

I have a table named Property with following columns in SQL Server: there are some property in this table that certain object in other table should give value to it. I want to make a pivot table like below that has one column for each property I’ve declared in 1’st table: I want to know how can I get columns

How can I return pivot table output in MySQL?

If I have a MySQL table looking something like this: company_name action pagecount ——————————- Company A PRINT 3 Company A PRINT 2 Company A PRINT 3 Company B EMAIL Company B PRINT 2 Company B PRINT 2 Company B PRINT 1 Company A PRINT 3 Is it possible to run a MySQL query to get output like this: company_name EMAIL

How do I make the rows of a lookup table into the columns of a query?

I have three tables: students, interests, and interest_lookup. Students has the cols student_id and name. Interests has the cols interest_id and interest_name. Interest_lookup has the cols student_id and interest_id. To find out what interests a student has I do What I want to do is get a result set like where the column name ‘interest_a’ is a value in interests.name

Advertisement