THANK YOU! Finally an "Expert Level" video that doesn't teach to a beginner. It's so hard to find actually advanced information amidst all the beginner's tutorials.
Been using SQL as a functional ERP resource so I don’t know if I am an expert. This is very well done and IMHO not too far out of reach for someone who has the basics. Where have you been hiding?
I honestly don't get the recursive example as for it to work the EmployeeHierachy has to always change for it to check and find the next boss and their employees, and also how some employees are on same level but have different bosses?
Thank you very much. Please let me know if you have a full-fledged course? Looking to write user-defined functions with user input and create reports comparing databases from two different environments to show 2-way differences.
04:15 That should really be a NULL, not an empty string. And adding matching aliases to any columns without names or dissimilar names is best practice.
Thanks for the great video! A quick question, arround 22:09 where are doing the PctTotal, can't we replace the 3rd line "TotalDue/Sum(TotalDue) OVER (PARTITION BY OrderDat) as PctTotal" with ""TotalDue/TotalSales as PctTotal" since we already aliased "Sum(TotalDue) OVER (PARTITION BY OrderDat)" as TotalSales? Thank you again!
I'm glad you enjoyed. In this video I'm using SQL Server and the alias cannot be reused, however, in certain databases you are absolutely right and this can be done.
Nice samples. It's a little confusing because you have the same employee name assigned to two different employeeKeys (David Bradley is 7 & 8 for example)
Looks like he used UNION ALL which will contain duplicates. If he'd had just used UNION there wouldn't have been duplicates. I'm not sure why he used UNION ALL...
I'm just starting out, but my observations have been that R is data science research tool that offers great data transformation and visualization options, that Sql won't do or does very tediously. SQL can store large data very well, it's stable. Its an enterprise level product where R could not do, not very well any how. I think its not a question of which is better but how you can leverage both. Go easy on me, i am a Jr analyst.
@@JamesOliver what I meant to ask was "Can I download this sql database practice application adventureworks2012 on mobile for sql practice?" The thing is: my laptop has gone for repairs and it's gonna take A WHILE. So can we download this Microsoft sql application on mobile for practice? Thanks. Regards.
Hi James, have you ever thought about creating sql intermediate/advanced course? I learn sql, use mysql workbench but I need new database and good examples, so It would be very useful for me :)
As a matter of fact recently I have thought about creating a class. I started putting together a course outline. Anything specific you would be interested in learning?
Great idea! I'm in the middle of each of 3 SQL courses and we never get to the meaty stuff. The instructors struggle with explaining self-joins, for instance.
I have a question. I have 200 rows, and I want to delete from row 150 until 200. So, how can I choose from 150 to 200?. I will appreciate that if anyone can help me coz there is not such video on RU-vid.
This can be done in multiple ways. Apply row_numbers to each row, then write delete statement with where row_number>50, Im just a intermediate in in SQL. I guess this works for you
Please get microphone away from keyboard or use a quieter keyboard or don't hit the keys so hard. I want to hear you and I turn it up and then I have to turn it down when you start hitting enter.
There is a lot going on. I struggle with understanding it also, but I would suggest watching the video a few times and write your own similar queries against your own database.
Could you help with writing a query to find the total sales of employees reporting to each employee? Emp_Id Total sales of employees reporting to Emp_Id