Namaste sql

  1. Cody West on LinkedIn: #sql #dataanalytics #dataanalyst
  2. Browse through the guest posts from the MySQL category
  3. John Pauler on LinkedIn: #learn #sql #data #analysis #businessintelligence #datascience #careers
  4. Brij kishore Pandey on LinkedIn: #sql #dataanalytics #dataengineering #datascience
  5. Moaz Agha on LinkedIn: 3 Essential SQL Querying Skills
  6. Ankit Bansal on LinkedIn: #sql #join #interviewquestions
  7. Sign Up
  8. Ankit Bansal on LinkedIn: #sql #interviewquestions


Download: Namaste sql
Size: 68.12 MB

Cody West on LinkedIn: #sql #dataanalytics #dataanalyst

I NEVER write subqueries in SQL. They’re awful and CTEs are superior. Here’s why: CTEs make complex queries more readable. They break logic into digestible chunks. Readability means higher efficiency in writing SQL and better accuracy. Can you say, win? CTEs are also reusable and can be referenced multiple times from within the same query. There’s a software engineering principle called DRY or “don’t repeat yourself!” CTEs prevent you from repeating yourself. I seriously can’t remember the last time I used a subquery, but you should know that in some situations, subqueries can be more performant than CTEs. But I’ve never ahd performance issues with CTEs so I’ve never run into this situation. With the efficiency of cloud data warehouses, performance is less and less of a concern nowadays unless you’re working with truly large datasets or doing a lot of crazy transformations. So just use CTEs ;) And if you want more tips to improve your SQL, sign up for my newsletter, The Query (link in my profile). Every Thursday I’ll send you: - Resources for learning data analytics (like SQL guides) - 1 SQL deep dive - Datasets for portfolio projects - Data memes that’ll have you LOLing I use a lot of CTEs in my SQL queries too. I must say that there are also times where I need to use a subqueries as well. I mostly use subqueries in the WHERE and HAVING clauses of my queries (sometimes in the SELECT statement as well). But I NEVER use subqueries in the FROM clause. I use CTEs for those. 𝐒...

Browse through the guest posts from the MySQL category

Welcome to Namaste UI. Established in 2015, this technology blog from India covering topics on blogging, business, digital marketing, social media, e-commerce, SEO, finance, web design and development, health, lifestyle, travel etc. We offer guest blogging services, link building services and content writing services. • Facebook • Twitter • LinkedIn • Pinterest • Feed • Feedburner • My Business

John Pauler on LinkedIn: #learn #sql #data #analysis #businessintelligence #datascience #careers

If you use SQL, you need to use comments effectively. If you don't do this well, your code will be much less readable for your coworkers and also for your future self. There are 3 things I use comments for most frequently... 1. Explaining specific logic or calculations in the code -- if it's not obvious why I did something, I note my reasoning in a comment 2. Noting caveats, concerns, or limitations -- I might comment: "check column XYZ, there seem to be surprise NULLs" -- I might leave: "data doesn't start until X date" 3. Creating a table of contents -- this one is reserved for long code -- it can be super useful to explain what you're doing in your "data program" What do you use comments for? Want to learn SQL but not sure where to start? Check this out... HOW TO LEARN SQL: Your first SQL script will confuse even yourself Your first Tableau dashboard will look like it's your first dashboard Stop trying to perfect your first handful of projects Start pumping out projects left and right While learning, it's more important to create than to focus on optimizing Quantity > Quality Once you start getting faster, you'll have more time to swap it to Quality > Quantity You'll improve rapidly this way Join 6000+ others in rapidly improving their data analytics journey: Microsoft Excel is quite easy to learn than many of you think. Here are 10 useful functions that I have used 80% of the time as a data analyst: - VLOOKUP - INDEX MATCH - LEFT/MID/FIND - CONDITIONAL FORMATTING - DAT...

Brij kishore Pandey on LinkedIn: #sql #dataanalytics #dataengineering #datascience

7 Steps to Master SQL for FREE Often, people say that learning SQL is easy, but mastering it is a different ball game. Well, if you stick to this guide, you'll be well on your way to not just learn, but master SQL! 💪🧠 𝗦𝘁𝗲𝗽 𝟭: 𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀 𝗮𝗻𝗱 𝗦𝗤𝗟 🌐 Basics with Guru99: • Don't miss these SQL pro-tips -💡 Prefer EXISTS over IN where possible. 🔍 Utilize table aliases when working with multiple tables. 📊 Favor GROUP BY instead of DISTINCT to streamline your queries. ✍️ Remember to comment complex logic, but don't overdo it – balance is key. 🔀 Often, joins can provide better performance than subqueries. 𝗔𝗻𝗱 𝘁𝗵𝗲𝗿𝗲'𝘀 𝗺𝗼𝗿𝗲! 🔥🔥 🔎 Use WHERE, not HAVING, when filtering non-aggregate fields. 🚫 Wildcards at the start of predicates can lead to full table scans - avoid them where possible. 🎲 Considering cardinality within GROUP BY can enhance performance. 🔠 Maintain clarity by writing SQL keywords in capital letters. 📝 Avoid the temptation of select *; always list your columns explicitly. 𝗥𝗲𝗮𝗱𝘆 𝗳𝗼𝗿 𝗺𝗼𝗿𝗲? 📣 🔗 CTEs can increase readability over multiple subqueries. ⚙️ Opt for JOIN keywords instead of writing join condition in WHERE clause for better readability. ⏱️ Ordering within subqueries can unnecessarily increase runtime - avoid it where you can. 🔀 If you're sure there are no duplicates, use UNION ALL instead of UNION for better performance. 🐞 A useful debugging tip - start your WHERE clause with 1 = 1. Learning SQL gradually, as you presented here, starting from the basics ...

Moaz Agha on LinkedIn: 3 Essential SQL Querying Skills

💡 Remember, when you run into a tough problem it's important to take a step back and give yourself a break. 💪 Take a lesson from my mistake: I was up after midnight working on a really complex SQL pull from a database. I had a table with 4 different versions of Null values across multiple columns. I was too tired and spent almost an hour trying to write a super complex query that would be able to add all these rows together keeping their insane formatting. It worked, but didnt quite give the results I wanted, so I kept trying again and again. 🌙 Exhausted and feeling defeated, I decided to call it a night and get some well-deserved rest. When I came back to it the next day it only took me 5 minutes to realize I just needed to Clean the database and sync the Null formatting across all the values. Once the null values were all unified it was actually a pretty simple query. 🔍 It's easy to get tunnel vision and become fixated on a specific goal, losing sight of the bigger picture. 👉 Take breaks!!! ✨You never know what simple fix might be hiding in plain sight! ------------------------------------------- ✔ Follow for more Data tips and resources. Microsoft's launch of Fabric and Copilot's introduction is a game changer. Copilot will make writing DAX and building reports a lot easier. However, I still feel that every Power BI developer must master Data Modelling and the core concepts of Star Schema. The Data Model provides the base architecture for writing DAX and report visualiz...

Ankit Bansal on LinkedIn: #sql #join #interviewquestions

This question is often asked in SQL interviews and the interviewer may try to confuse you with multiple scenarios. You have 2 tables with column values as table1: 1,1,1,2,null,3,3 table2: 1,1,null, 4,4 You need to tell no of rows in o/p for all 4 kinds of join. Check out my video where I have covered all possible combinations for these types of questions and explained how to get the answer. Link in comment section. Inner join - 6 records(3 1's from the left table * 2 1's from the right table) Left join - 10 records(3 1's from the left table * 2 1's from the right table,2,3,null) Right join - 9 records(2 1's from the right table * 3 1's from the left table,null,4,4) Full outer join - 13 records(3 1's from the left table * 2 1's from the right table,null,2,3,3,null,4,4) Ask your interviewer whether or not you need to take care of null values and then if he/she says yes, the simply, Apply the concept of null safe join while performing join and your job gets done ✅. Null safe operator : If the interviewer says NO, then perform normal join ignoring null values in inner join but not while doing left, right and outer join.

Sign Up

• العربية (Arabic) • Čeština (Czech) • Dansk (Danish) • Deutsch (German) • English (English) • Español (Spanish) • Français (French) • हिंदी (Hindi) • Bahasa Indonesia (Indonesian) • Italiano (Italian) • 日本語 (Japanese) • 한국어 (Korean) • Bahasa Malaysia (Malay) • Nederlands (Dutch) • Norsk (Norwegian) • Polski (Polish) • Português (Portuguese) • Română (Romanian) • Русский (Russian) • Svenska (Swedish) • ภาษาไทย (Thai) • Tagalog (Tagalog) • Türkçe (Turkish) • Українська (Ukrainian) • 简体中文 (Chinese (Simplified)) • 正體中文 (Chinese (Traditional)) Language

Ankit Bansal on LinkedIn: #sql #interviewquestions

If you have ever given an SQL interview some of the questions would be definitely from below list : 1- How to find duplicates in a table 2- How to delete duplicates from a table 3- Difference between union and union all 4- Difference between rank,row_number and dense_rank 5- Find records in a table which are not present in another table 6- Find second highest salary employees in each department 7- Find employees with salary more than their manager's salary 8- Difference between inner and left join 9- update a table and swap gender values. 10- Number of records in output with different kinds of join. If not exact at least flavor of these questions are always asked in interviews irrespective of your experience level :D Want to know the answers of these question ? check the link in comment section. 1. Select column names from table group by column names having count (*)>1; 2.delete from table where row_id not in (select max(row_id)from table group by column names; 3.union it's will gives unique record from both the tables Unionall It will unique records with Duplicate records. 4.rank : it skips the number for similar value. Row num: dynamic value automatically retrieved along with select statement output. Dense_rank: it does not skips the number for similar value. 6.select *from (select Sal, row number rn from (select distinct sal from table order by Sal desc))where rn=2; 7. LEFT JOIN : It will all records from left table and match records from right table INNER JOIN: matchin...