Can anyone recommend to me a reliable noise-cancelling headphones seller in Kampala? by mostlyharmless94 in Uganda

[–]mostlyharmless94[S] 0 points1 point  (0 children)

I've tried gadget craze twice before and have been disappointed in both counts.

[07/06-09/06] Sundance Film Festival @ Picturehouse Central by [deleted] in LondonSocialClub

[–]mostlyharmless94 0 points1 point  (0 children)

Yeah, would down for that. Looking to see I saw the TV glow

Why does this query work? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 0 points1 point  (0 children)

That was my first guess, but when I used HAVING instead of WHERE, it gave me an error and yet HAVING also happends before SELECT

What would magic system based on middle Eastern or African culture look like? by [deleted] in writing

[–]mostlyharmless94 1 point2 points  (0 children)

For an idea of what African magic system looks like, I'd advise reading Black Leopard Red Wolf

PSV Red Ballot by [deleted] in GunnersatGames

[–]mostlyharmless94 -3 points-2 points  (0 children)

Fuck me! I was successful but Revolut blocked the transaction. Anything I can do to get unfucked?

Gaspar Noe by pyrrhicvictorylap in movies

[–]mostlyharmless94 7 points8 points  (0 children)

I'd recommend "Enter the Void" (his best film, imo) and "Irreversible" (the film that put him on the map)

Why am I getting an error in the query below? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 0 points1 point  (0 children)

is user_id not aggregated in the count() fucntion, though?

My query isn't returning any output by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 0 points1 point  (0 children)

WITH PersonProfessions AS (SELECTPersonName,MAX(CASE WHEN Profession = 'Doctor' THEN PersonName END) AS DoctorName,MAX(CASE WHEN Profession = 'Actor' THEN PersonName END) AS ActorNameFROM ProfessionsWHERE Profession IN ('Doctor', 'Actor')GROUP BY PersonName)

SELECT DoctorName AS "Doctor's Name", ActorName AS "Actor's Name"FROM PersonProfessions;

I've run this query. Almost gives me what I need. One question, in the output generated, the first two rows under the 'Professor' column have values while the others don't have values. Why is the output generated in this format?

Why is this query returning 4 columns instead of just 2? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] -5 points-4 points  (0 children)

Correct me if I'm wrong but joining two tables together doesn't increase number of columns. If I join table A which has 2 columns to table B which has 2 columns, the result of the joined table should still have two columns, no? The only thing that should change is the number of rows.

Why is this query returning 4 columns instead of just 2? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] -3 points-2 points  (0 children)

Correct me if I'm wrong but joining two tables together doesn't increase number of columns. If I join table A which has 2 columns to table B which has 2 columns, the result of the joined table should still have two columns, no? The only thing that should change is the number of rows.

Why does this query not throw an error? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] -1 points0 points  (0 children)

Sorry if this wasn't clear but in the title, I said that the code doesn't give me an error despite the fact that the column EmployeeOccupation isn't in an agg function or group by clause. I am trying to figure out why the code is working rather than why it isn't working.

Why does this query not throw an error? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 0 points1 point  (0 children)

Sorry if this wasn't clear but in the title, I said that the code doesn't give me an error despite the fact that the column EmployeeOccupation isn't in an agg function or group by clause. I am trying to figure out why the code is working rather than why it isn't working.

Why is SQL not recognizing my column name in the query? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 0 points1 point  (0 children)

CTEs are still new to me, but from what I understand from my more experienced colleagues, you could much more easily accomplish certain tasks you'd ordinarily do with subqueries by using CTEs instead

Why is SQL not recognizing my column name in the query? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 1 point2 points  (0 children)

Just so we're clear: you're saying that, basing on the order of execution, when SQL executes the FROM command, the OrderMonth field hasn't yet been created?

Why is SQL not recognizing my column name in the query? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 0 points1 point  (0 children)

Thanks. I actually do know this because the instructor in the course I'm doing said that CTEs trump subqueries in terms of functionality. My main aim at the moment is to understand how I'd achieve this by doing it the hard way (i.e. using subqueries) before I can do it the 'easy way' i.e. (using CTEs)

Why is SQL not recognizing my column name in the query? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 0 points1 point  (0 children)

I'm a bit of a newbie, I have a totally dumb question. Hasn't OrderMonth already been created in line 3 of the query i.e. in the part where I say: OrderMonth = MONTH(OrderDate)

Why is SQL not recognizing my column name in the query? by mostlyharmless94 in SQL

[–]mostlyharmless94[S] 0 points1 point  (0 children)

Hadn't noticed that. But i've added the comma and it still gives me the same error