Skip to content
Advertisement

Tag: tsql

TSQL PIVOT/UNPIVOT Multiple Summarized Columns

Seems this is a popular topic but I can’t seem to replicate other answers. I have data that is already summarized by month/year for multiple categories. What I’m trying to get is this Here’s the query to provide the data I’ve used PIVOT a bunch of times, but with a single “category” of data. I can’t seem to get anything

Sql join only 1 row

I want to join the table CustomerAgreementRole with only one row from AgreementRoleGroup, based on ViewPriority. Example: CustomerAgreementRole can have three rows. I only want the joined row where ViewPriority is highest Current query: Expected result: Answer Made it working with this:

TSQL Two different tables, 800GB vs 2GB Find common

I have two tables, generatedblock table, and addresses table The generatedblock table has a column called expandedblock block. The addresses table has a column called address. What I need to do is find if in the generatedblock table there is a value in the addresses table. I have tried failed code but I am not reposting because my tsql sucks,

Advertisement