News for hackers. Stuff that matters.
Re:Medium-hard SQL interview questions by oyoun on Saturday May 02, 2020 @08:36PM (#23056003)
I think SQL is a language to be known by every programmer. With the right query, you may solve a problem that may take 100 lines in other languages.

It is so usefull, reliable and does not change every year.

Re:Medium-hard SQL interview questions by TrackerFF on Saturday May 02, 2020 @10:17PM (#23056365)
With the extreme popularity of pandas, I think a lot of Python programmers would be amazed how clean and easy-to-read SQL queries look like, compared to the (downright) mess that's being written to query pandas dataframes.
Re:Medium-hard SQL interview questions by bradleyjg on Sunday May 03, 2020 @07:03AM (#23058270)
Depends on the transformation. Dropping a couple of columns in a wide dataset is extraordinarily ugly in sql vs anything else, for example.
Re:Medium-hard SQL interview questions by zbentley on Sunday May 03, 2020 @11:18AM (#23059483)
...how is it ugly in SQL? Don't SELECT those columns. Or, if you need to do multiple things with the dataset sans those columns, use a CTE of a query that doesn't SELECT those columns. Or a view.

It seems like SQL is only uglier if you're used to "SELECT *"ing, which is asking for trouble--in SQL or when doing the equivalent with other row/column data manipulation tools.

Re:Medium-hard SQL interview questions by bradleyjg on Friday May 08, 2020 @09:59AM (#23114922)
I don’t see what the issue is with using something like spark’s drop over using select.
Re:Medium-hard SQL interview questions by beckingz on Sunday May 03, 2020 @11:13AM (#23059453)
Just don't pick them in the first place?

Though I'll grant you that extremely wide data is a lengthy experience to write SQL for.

Re:Medium-hard SQL interview questions by thomzi12 on Sunday May 03, 2020 @10:21AM (#23059146)
Agreed! Pandas is great but at this point instead of using logic to solve data structuring tasks I often find myself googling for an optimized built-in Pandas method to help me out. Leads to less elegant code -- not sure if it is less readable though.
Re:Medium-hard SQL interview questions by Gatsky on Saturday May 02, 2020 @11:55PM (#23056754)
Well R has packages that buy you similar functionality eg dplyr.
Re:Medium-hard SQL interview questions by alexilliamson on Sunday May 03, 2020 @02:09PM (#23060776)
Dplyr is IMO the best thing to come from R. The design is so much simpler than pandas and the operations mirror SQL operations so closely.