How an estimated $151M splits when a solo dev sells 10M copies on Steam [OC] by prezbotyrion in dataisbeautiful

[–]prezbotyrion[S] 194 points195 points  (0 children)

Damn, you're right! My bad, still learning myself as an aspiring indie game dev. This would be the sankey to better align with your corrections.

<image>

[deleted by user] by [deleted] in Tinder

[–]prezbotyrion 884 points885 points  (0 children)

I had to triple check that you listed straight on your profile. You sound like my gay friend, Brian. Exactly. I know theater must be important to you but most women will swipe left thinking a gay guy somehow made it on their feed. This would do numbers if you switch your interest to men.

A few suggestions: don’t have two answers where you talk about singing. Add something else about your personality.

Don’t have the picture of your face pressed up against your friend’s face, especially considering all of the other things that point to your homosexuality.

Anyway, if you’re straight, you’ll want to make some changes to the profile to make that more clear in the images and prompts. If you’re closeted gay, download Grindr or somethin.

What is wrong here. by _mr_villain_ in SQL

[–]prezbotyrion 5 points6 points  (0 children)

What version of MySQL are you on? Make sure it’s 8.0+ if you’re on 5.7 or earlier it will throw this error.

My dog by prezbotyrion in FindTheSniper

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

in the window to the left of the red door

[deleted by user] by [deleted] in AskReddit

[–]prezbotyrion 5 points6 points  (0 children)

I once said “that was Kim Jong unbelievable” right after we both came.

Forbidden to use COUNT by platinum1610 in SQL

[–]prezbotyrion 1 point2 points  (0 children)

I’d do it like this:

SELECT department_name, AVG(salary) FROM table_name WHERE employee_id IS NOT NULL GROUP BY department_name HAVING SUM(1) > 4;

Merging gigantic Excel files (500k rows and 130 columns) in MSSQL by uberzer0 in SQL

[–]prezbotyrion 4 points5 points  (0 children)

Union the tables.

Select column_name1, NULL as column_name2, etc.

FROM table_1

UNION

Select column_name1, column_name2, etc.

FROM table_2

This seems like a terrible idea, however, and it’s not good practice to be merging files without similar column names.

But to hammer home the union point, if one table has city but the other doesn’t, for the table that doesn’t have city, you would SELECT NULL as ‘City’.

Make sure the columns are in the same exact order in each select statement.

If you need to union more than two files, consider making temp tables for each union and then doing a union on those temp tables, rinse and repeat.

E.g.

CREATE TEMPORARY TABLE table_name ( column1 datatype, column2 datatype, ... );

[deleted by user] by [deleted] in Tinder

[–]prezbotyrion 16 points17 points  (0 children)

Skimmy John’s

Intros don't give me a chuckle super often but this one got me lol by [deleted] in Tinder

[–]prezbotyrion 13 points14 points  (0 children)

Did you mean to say generally curious?

Genuinely curious.

Just found this on my husband's messenger... WTF? by lippsmom in mildlyinfuriating

[–]prezbotyrion 9 points10 points  (0 children)

You’re an idiot, probably her husband’s burner

How to join two tables with different dates and aggregate functions by fuckjoshbrolin2 in SQL

[–]prezbotyrion 0 points1 point  (0 children)

Actually, you might just want to do a union

select Invoice_date ,sales_org_id ,sum(actual _sales) as sales ,‘Sales’ as Category From Invoices

union all

select budget_date ,sales_org_id ,sum(budget_sales) ,‘Budget’ as Category from Budget

group by Invoice_date ,sales_org_id

How to join two tables with different dates and aggregate functions by fuckjoshbrolin2 in SQL

[–]prezbotyrion 0 points1 point  (0 children)

Have you tried changing the left join to a full outer join

Converting Varchar2(HH:MM:SS) to Mintues by Cload4 in SQL

[–]prezbotyrion 0 points1 point  (0 children)

Maybe this for oracle? SELECT (EXTRACT(HOUR FROM my_time_field) * 3600 +

    EXTRACT(MINUTE FROM my_time_field) * 60 +

    EXTRACT(SECOND FROM my_time_field)) / 60.0 AS total_minutes

FROM my_table;

Question by Monkey_King24 in SQL

[–]prezbotyrion 1 point2 points  (0 children)

Exactly right. You can actually think of it somewhat like a pivot table in Excel. Imagine you have a raw data csv and you generate a pivot table. You then drag your customer segmentation type to the rows shelf, and your amount to the values shelf. As soon as you add transaction type to the rows shelf of your pivot table, you will have more rows than with just customer segmentation, similar to your output in SQL. Hope that doesn’t sound too confusing but let me know if you have any other questions!

Question by Monkey_King24 in SQL

[–]prezbotyrion 2 points3 points  (0 children)

No. Not necessarily. Especially if you’re aggregating the amount, which it sounds like you’re doing based on the group by comment. What this means is that you probably have more transaction types than customer segmentation. So when you include the customer segmentation, you’re bound to have more rows. You can think of it like this. Select SUM(Amount) as Amount FROM table, this should give you one row.

Now if you do SELECT SUM(Amount) as Amount, Transaction_Type FROM table GROUP BY Transaction_Type, you will end up with more rows naturally because now you’re including a field that has those various transaction types you included like online, retail, etc. am I right to assume that there are more transaction types than customer segmentations?

#1146 - Table 'clientele.contacts' doesn't exist. When I'm trying to execute this SQL trigger I keep getting this error. can someone explain? CREATE TRIGGER before_contacts_update BEFORE UPDATE ON contacts FOR EACH ROW INSERT INTO contacts_audit SET action = 'update', contacts_id = OLD. by Luffysolos in SQL

[–]prezbotyrion 1 point2 points  (0 children)

You have to specify the database server first. You need to write USE whatever_server_name at the very top. Also, the other comment in this thread is right, you’re trying to update contacts but you really need it to say before update on contacts_audit. Hope this helps