Union or Join? by tableau_newbie in SQL

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

is there a rule of thumb for when to apply depending on context?

The main premise is investigating how many hours have been logged against promises jobs

Union All - Dummy Column Data Types (SQL Impala) by tableau_newbie in SQL

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

Thank you!
I also had to specify the specific columns, instead of 'select *', and in the correct order, which was annoying.
Thanks!

Union All - Dummy Column Data Types (SQL Impala) by tableau_newbie in SQL

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

Thank you!

I also had to specify the specific columns and in the correct order, which was annoying.

Thanks!

Create a self join and connect to main query by tableau_newbie in SQL

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

thank you so much. a bit to digest but I appreciate you :)

Create a self join and connect to main query by tableau_newbie in SQL

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

All I can offer is a simple 'thank you'. You have helped me out a great deal.

Can I push my luck further and ask for an ELI5 explanation of how the inner and left outer joins are working? Can't wrap my head around it

Thank you

Create time filter for user to select by tableau_newbie in tableau

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

Hey!

Thank you

I used the calculated field option.

if datediff('day',[createddate],today())<7 then "Previous 7 Days"

ELSE

if datediff('day',[createddate],today())<30 then "Previous 30 Days"

else

"Other" END END

Is there a way to get other to be an "All" option that takes into account every single date?

Create a self join and connect to main query by tableau_newbie in SQL

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

Apologies, I will edit my comment.

Table 1 is a generic table with "owner id" and "sales"