Current Events > Any SQL gurus here?

Topic List
Page List: 1
The_Creep_2020
03/25/21 5:52:24 AM
#1:


So like, I figured thered be some squirrelly people on here.

I need to pull a query of some data thats long like

Key1 Key2 Key3 MeasurementType Measurement

Then pivot it so its wide like

Key1 Key2 Key3 MeasurementType1 MeasurementType2 MeasurementType3 ...

I was just pulling a query thats long and using a stats program to pivot it, which takes 50,000,000 years.

Ive rewritten one thats like

Select distinct Key1, Key2, Key3, max(measurementtype1) as measurementype1 ...

But that relies on me always knowing whats in measurement type.

Id ask on stackoverflow or reddit, but theyre both a wretched hive of snark and pedantry.

Cheers in advance!
---
Have I carved enough, my Lord?
Child, you are a bone
... Copied to Clipboard!
pinky0926
03/25/21 5:54:45 AM
#2:


I'd ask the senior SQL developer at my work but she is very snark and pedantry and refuses to help with anything unless she can see the real data and code. sorry :(


---
CE's Resident Scotsman.
https://imgur.com/ILz2ZbV
... Copied to Clipboard!
#3
Post #3 was unavailable or deleted.
The_Creep_2020
03/25/21 6:09:58 AM
#4:


pinky0926 posted...
I'd ask the senior SQL developer at my work but she is very snark and pedantic and refuses to help with anything unless she can see the real data and code. sorry :(


Its all good, I know enough SQL to normally pull the stuff I need to work with, but anything above beginner stuff is a mystery to me.
---
Have I carved enough, my Lord?
Child, you are a bone
... Copied to Clipboard!
#5
Post #5 was unavailable or deleted.
The_Creep_2020
03/25/21 6:17:49 AM
#6:


leverageblargh posted...
You had bad experiences with those sites or you going by reputation?

Actually, having a look at /r/SQL it seems pretty chill. It must have just been a few times when its come up in google searches Ive done.

stackoverflow has come up when Ive googled solutions in the past for various things in other programs/languages and theres a whole lotta snark. Particularly for r. *shudder*
---
Have I carved enough, my Lord?
Child, you are a bone
... Copied to Clipboard!
Veggeta X
03/25/21 6:30:58 AM
#7:


The_Creep_2020 posted...
Select distinct Key1, Key2, Key3, max(measurementtype1) as measurementype1 ...
You pretty much got it

---
Don't like it? Don't watch it. It's that simple
Dictator of Nice Guys
... Copied to Clipboard!
Topic List
Page List: 1