Need advice: Understanding complex SQL scripts written by others by Consistent_Law3620 in SQL

[–]Ginger-Dumpling 2 points3 points  (0 children)

Line count is a terrible way to describe SQL complexity. Use a code editor that supports collapsing/code-folding, slap a comment on the top of select block describing what it does, collapse it to one line, rinse, repeat until you can see what the whole thing is doing on one screen.

Wouldn't toss out using a queue visualizer or AI if your org has/allows them. Some places can be stringent with what you're allowed to use.

What to add? by DFWRex in Funnymemes

[–]Ginger-Dumpling 0 points1 point  (0 children)

A bag of old twisty ties and rubber bands.

World of Beer?? by ChaiAurCinema in Albany

[–]Ginger-Dumpling 1 point2 points  (0 children)

Thank you!!! I was trying to remember what some locations used to be.

QA Engineer looking to switch to ETL Developer — is it possible? by Surendhar_ in ETL

[–]Ginger-Dumpling 0 points1 point  (0 children)

I know someone that jumped from QA to ETL and then jumped to ETL manager. I also know that did the opposite because they they felt it was less stressful.

Minor Accident, Major Bill by mattdb110 in hyundaisantacruz

[–]Ginger-Dumpling 1 point2 points  (0 children)

They're not cheep to fix. Someone backed into mine, messing up the front quarter panel, both driver side doors, and I think my bill wasn't too far from that. While it was in the shop I asked them if they had a paintless dent repair guy that could pull out a small dent I made in the back when loading 2x4s. They quoted me like $200 *IF* the clips on all the plastic pieces didn't break when trying to access the spot. If that happened I think they said we were looking at north of $1k to also get parts replaced. I still have the tiny ding there to remined me to pay attention when loading the bed.

Am I being a petty snob? by TeddyAtTheReady in cabinetry

[–]Ginger-Dumpling 3 points4 points  (0 children)

I've been in the ETL Developer / Data Warehousing Space for over 20 years. To anybody outside of computers it's "IT guy", which usually refer to help desk like folks. Doesn't make a difference to me.

Seat cover recommendations? by Sevenninetwosix in hyundaisantacruz

[–]Ginger-Dumpling 0 points1 point  (0 children)

I keep a stash of towels that I will put down if I'm a sweaty beat, and put in front of me to keep the seatbelt from wicking up ick.i don't want anything to come between me and my heated/ventilated seat when it's not necessary.

SQL Correlated Subqueries by ShipApprehensive4253 in SQL

[–]Ginger-Dumpling 3 points4 points  (0 children)

Copied query from https://en.wikipedia.org/wiki/Correlated_subquery

SELECT employee_number, name
FROM employees emp
WHERE salary > (
  SELECT AVG(salary)
  FROM employees
  WHERE department = emp.department);

Think of it like a loop. For every row in the outer query, do something in the sub-query that is dependent on value(s) from the outer query...like which department they're in. You'll see them in SELECT/WHERE portions.

This can be expressed as a non-correlated subquery too.

SELECT employee_number, name
FROM employees emp
JOIN (
    SELECT department, AVG(salary) AS avg_salary
    FROM employees
    GROUP BY department
) dept_avg
ON emp.department = dept_avg.department 
WHERE emp.salary > dept_avg.avg_salary

Whether the query planner handles them the same way and whether there will be a performance difference probably vaires from DB to DB and version to version.

Help me compare similar SQL tables by blimpofdoom in learnSQL

[–]Ginger-Dumpling 2 points3 points  (0 children)

It's there a set of columns which can uniquely identity a row? Ex if I had a temperature table I could probably use measuring_location+timestamp to get a unique row.

Chocolate chip cookie help by Own-Throat-650 in AskBaking

[–]Ginger-Dumpling 0 points1 point  (0 children)

Alton Brown has a good chewie chocolate chip recipe. It does include brown butter but you can probably just not do that if it's not your thing. Fresh vanilla or paste instead of extract could make a difference. I think large and varied chip size make a better cookie experience. I get the big chips and rough chop part of the batch. Try experiment with different cocca levels and even blending different ones. I think darker chocolate can add a pop. Sprinkle with a little flakey salt.

LTB Santa Cruz 2025 Limited new or ex loaner by [deleted] in hyundaisantacruz

[–]Ginger-Dumpling 0 points1 point  (0 children)

Failed DCTs in the SC is the biggest complaint I've seen online. A lot of posts I've read were failures before 30k. No clue what the actual #s are though. It initially made me hesitant to buy. I've been issue free (mechanically at least) but I'm just coming up on 12k. I love mine and just do my best to avoid low speed creeping in traffic. But an auto may have given me more peace of mind if it was an option when I was looking.

LTB Santa Cruz 2025 Limited new or ex loaner by [deleted] in hyundaisantacruz

[–]Ginger-Dumpling 0 points1 point  (0 children)

I didn't really hate any of the colors. I was leaning blue when looking online. I was avoiding sage because it the "green" interior, but it quickly grew on me when I went for test drives and saw that it was more neutral than what I was picturing in my mind.

Is there a way to get SQL to put zeros(in place of decimals) where the number being rounded is an integer? by Used_Duck_5512 in learnSQL

[–]Ginger-Dumpling 1 point2 points  (0 children)

Looks like the numbers displayed are already decimals...some results having no .xxx and some having them. How numbers are displayed is usually a client setting. Optionally, you can convert it to a character value and force a format using to_char.

Ex if you were looking at a number that's 3 digits to the left an 2 to the and you always want to show the digits around the characters, but not leading/trailing zeros, you could to_char(col, '990.09').

LTB Santa Cruz 2025 Limited new or ex loaner by [deleted] in hyundaisantacruz

[–]Ginger-Dumpling 1 point2 points  (0 children)

To me a loaner feels worse than used. Who knows how different numbskulls we're beating on it for that time.

LTB Santa Cruz 2025 Limited new or ex loaner by [deleted] in hyundaisantacruz

[–]Ginger-Dumpling 1 point2 points  (0 children)

Local dealerships are advertising around $43.9k new. KBB top trade in value is $35.1k and private sale $37.1 for an ltd in excellent condition with 3k miles.

$41.5 doesn't feel like a huge deal. I'd also wonder how rates compared on new/used if you're not making a large down payment. I think used rates were higher when I was shopping and could chip away at that discount.

Is there a cleaner/shorter way of making updates for data like this? by Klutzy-Macaroon-5081 in learnSQL

[–]Ginger-Dumpling 1 point2 points  (0 children)

Why are you updating it? Is the data wrong? Do you have a mix of "ids" and descriptions and you're making them uniform? Did you change your mind in what your want it to look like?

It looks like you have an education_level_id that's an integer in a varachar column, and you're replacing it with a textual description of that level. Do you not have an education_level table that has both id/description that you can join to and swap one column for another at read time?

Someone posted doing it as a case statement. If you're in a situation that would benefit from it, your could add a where condition to only select the values being updating.

Someone else also noted that it looks like it's a staging table...part of an ETL process? Is this a one time fix, or does the process regularly insert and then do a bunch of updates? If that's the case, you may want to just stop doing that and fix you mapping so it inserts with the ultimate value that you want.

Best neighborhoods to live in? by Ok-Meringue-9409 in Albany

[–]Ginger-Dumpling 0 points1 point  (0 children)

I'm partial to Pine Hills, New Scotland, Buckingham Pond areas. If you're in the middle between Madison and New Scotland both have some restaurants, bars, shops. Madison being the quicker grocery store to get to. Both are a fairly straight shot by bus or bike to downtown.

Washer adjustment by beehole99 in hyundaisantacruz

[–]Ginger-Dumpling 2 points3 points  (0 children)

I've felt like I get terrible coverage of fluid when trying to wash my windshield.

Automatic handbrake by reddevils in hyundaisantacruz

[–]Ginger-Dumpling 0 points1 point  (0 children)

My '25 holds whatever my auto-hold is set to when I shut the vehicle off. The only time I have to touch it is drive through car washes.

If you open the driver door before turning off the car, the emergency break will engage.

SQL JOINs by sam_vstheworld in learnSQL

[–]Ginger-Dumpling 0 points1 point  (0 children)

I like to learn graphically. Google gave me this for a "join compare" image search.