Web: https://www.reddit.com/r/datascience/comments/vixbr1/pro_tip_use_stored_procedures_instead_of/

June 23, 2022, 1:46 p.m. | /u/rotterdamn8

Data Science reddit.com

I'm not sure how common this is, but I've seen some analytics people copy and paste SQL code many times, where there's some slight variation. Say, doing a similar transformation but on different columns. It causes the length of the code to blow up.

Just like using functions in programming, you can do for loops, if/then conditions, take input arguments, etc.

But for the love of god please don't copy and paste a code block 20 times lol.

code datascience sql sql code

Machine Learning Researcher - Saalfeld Lab

@ Howard Hughes Medical Institute - Chevy Chase, MD | Ashburn, Virginia

Project Director, Machine Learning in US Health

@ ideas42.org | Remote, US

Data Science Intern

@ NannyML | Remote

Machine Learning Engineer NLP/Speech

@ Play.ht | Remote

Research Scientist, 3D Reconstruction

@ Yembo | Remote, US

Clinical Assistant or Associate Professor of Management Science and Systems

@ University at Buffalo | Buffalo, NY