Yesterday when I tackled a fun SQL challenge where I had to calculate the error between 2 columns where a number was lost due to a keyboard key. While I was trying to solve it, I was not able to do it at that moment, like how I do with the other sql challenge, but this one is a little bit trickier, as I didn't see this type of thing before. It was a great exercise for me in using the REPLACE() string function, converting the string to a number using the CAST(), calculating the values using the AVG(), which is common, and finally finishing up with CEIL(), a mathematical function that returns the next whole number, like 19.21 to 20.00. Through this, I strengthened my problem-solving mindset and reinforced my understanding of SQL functions in real-world scenarios. It's small challenges like these that sharpen the skills and build the confidence for bigger data engineering tasks. I also follow the "SQL Pocket Guide" book by Alice Zhao to keep myself prepared on SQL every day. #sql #dataengineering #learningbydoing #problemsolving #dataskills #opentowork
SQL Challenge: Using REPLACE(), CAST(), AVG(), and CEIL() Functions
More Relevant Posts
-
🧠 SQL Mid Module Contest. Turning Logic into Solutions Recently participated in the SQL Main Mid Module Contest at Newton School, and it truly tested how well I can apply concepts in real scenarios. This wasn’t just about writing queries it was about thinking through data, identifying patterns, and solving problems step by step. Solved 6 real-world SQL problems under timed conditions, covering: • multi-table joins and aggregations • window functions and ranking logic • indirect relationships in data • streak and sequence-based problems Scored 92% in the contest, reflecting strong problem-solving ability and consistency in SQL. Key learnings: 👉 SQL is more about how you think than what you type 👉 Breaking complex problems into smaller parts is the real skill 👉 Practical problem-solving builds true understanding This experience strengthened my ability to work with real datasets and derive meaningful insights using SQL. Looking forward to applying these skills in real-world data analysis and business problem-solving 🚀 #SQL #DataAnalytics #OpenToWork #ProblemSolving #DataSkills
To view or add a comment, sign in
-
📊 SQL Practice: WHERE Clause & Logical Operators Today I practiced SQL queries focusing on WHERE conditions and logical operators, which are very important for filtering and analyzing data. 🔹 Topics Covered: Basic WHERE conditions (=, !=, >, <, >=) AND, OR, NOT operators BETWEEN, IN, NOT IN LIKE for pattern matching Aggregate functions (AVG, COUNT) Sorting & grouping (ORDER BY, GROUP BY) 🛠️ I created a sample students database and performed multiple queries to extract meaningful insights. 💡 Example: Find students from USA Filter scores above 70 Group students by country Find highest scoring student This practice helped me improve my understanding of data filtering and query optimization, which is essential for Data Analyst roles. 📌 Check out my full SQL code on GitHub 👇 [Add your GitHub link here] #SQL #DataAnalytics #Learning #BeginnerProjects #DataScience #OpenToWork
To view or add a comment, sign in
-
I used to think I knew SQL & then I revisited SQL concepts for a deep dive 😅 Turns out there's a big gap between "writing queries that work" and "writing queries that scale." A few things I had to unlearn: ❌ Using WHERE to filter aggregates → runtime error ✅ HAVING exists for a reason — use it after GROUP BY ❌ SELECT * in every query ✅ Only fetch the columns you need — always ❌ Assuming NULL means false or empty ✅ NULL in any arithmetic = NULL. Check with IS NULL, handle with COALESCE ❌ Putting functions in WHERE like YEAR(date) ✅ This breaks index usage entirely. Rewrite with BETWEEN ranges ❌ Thinking subqueries are always fine ✅ JOINs outperform subqueries on large tables — know when to switch Share your thoughts or other approaches for the SQL optimization process and connect for more. #SQL #BackendDeveloper #DatabaseEngineering #QueryOptimization #PythonBackend #SoftwareEngineering #100DaysOfCode #CareerGrowth #OpenToWork #TechCommunity
To view or add a comment, sign in
-
-
As I continue exploring SQL fundamentals in more depth, today I focused on understanding the difference between CHAR, VARCHAR, and NVARCHAR. These data types are commonly used, but choosing the right one is important for performance and storage. What I learned: CHAR(n) : Fixed length Always uses the defined space. If the value is smaller, it fills the remaining space with extra spaces. VARCHAR(n) :Variable length Stores only the actual data length, which helps save storage. NVARCHAR(n) : Variable length (Unicode support) Used to store multilingual data (like special characters, different languages). Example: If we store 'Info' in CHAR(10), it still takes 10 characters. But in VARCHAR(10), it only uses space for 'Info'. And NVARCHAR is useful when storing values like names with different languages or special characters. Key takeaway: Use CHAR for fixed-length data (like codes) Use VARCHAR for regular text Use NVARCHAR when Unicode or multiple languages are required Revisiting these basics helped me understand how proper data type selection can impact database design and efficiency. Still learning and improving step by step. #DataEngineering #SQL #SQLServer #DatabaseDesign #DataAnalytics #LearningInPublic #OpenToWork
To view or add a comment, sign in
-
🚀 Just Published My New Blog on SQL! If you're starting your journey in data analytics or databases, understanding SQL is a must. I’ve put together a beginner-friendly guide covering: ✅ What SQL is ✅ Types of SQL Commands (DDL, DML, DQL, DCL, TCL) ✅ Simple examples for each command 💡 This blog is perfect for students, beginners, and anyone preparing for data-related roles. One key takeaway: Understanding the difference between commands like DELETE, TRUNCATE, and DROP can save you from serious mistakes in real-world projects! 📖 Read the full blog here: https://lnkd.in/g35sdpUb I’d love your feedback and suggestions 🙌 #SQL #DataAnalytics #Learning #Beginners #Database #Tech #DataScience #OpenToWork
To view or add a comment, sign in
-
This time, I worked on a Library Management System, where I used SQL queries to manage and analyze book records, user data, and borrowing activity. 🔍 Key insights & tasks I explored: 📖 Tracking issued and returned books 👥 Managing library members ⏳ Identifying overdue books 📊 Analyzing borrowing trends 📚 Categorizing books by genre and availability 💡 SQL concepts I practiced: ✔ JOIN operations (INNER JOIN, LEFT JOIN) ✔ GROUP BY with aggregate functions ✔ Filtering using WHERE and HAVING ✔ Subqueries for deeper analysis ✔ Sorting and organizing data This project gave me a better understanding of how databases are used in real-world systems like libraries and how SQL helps in efficient data management and decision-making. 🔗 GitHub Repository: [https://lnkd.in/dAPMmcSN] I’m continuously improving my skills in SQL, Data Analysis, and problem-solving, and I’m excited to build more real-world projects. Your feedback and suggestions would mean a lot! 😊 #SQL #DataAnalytics #LibraryManagement #Database #LearningJourney #GitHub #AspiringDataAnalyst #OpenToWork
To view or add a comment, sign in
-
📊 SQL Practice – Article Views I (LeetCode 1148) Solved a SQL problem focused on identifying authors who viewed their own articles. 🔹 Concepts Applied: • DISTINCT to remove duplicate records • WHERE clause for filtering conditions • Comparing columns within the same table • ORDER BY for sorting results This type of query is useful in analyzing user behavior and detecting patterns such as self-engagement in datasets. Continuously strengthening my SQL fundamentals for Data Analyst roles by solving practical database problems. #SQL #DataAnalytics #DataAnalyst #MySQL #LeetCode #OpenToWork
To view or add a comment, sign in
-
-
🚀 SQL Commands Simplified – Your Complete Roadmap If you're starting your journey in data analytics, understanding SQL commands is a must! This visual breaks down SQL into 5 key categories: 🔹 DDL (Data Definition Language) – Structure your database (CREATE, ALTER, DROP, TRUNCATE, RENAME) 🔹 DML (Data Manipulation Language) – Work with data (INSERT, UPDATE, DELETE) 🔹 DQL (Data Query Language) – Retrieve data (SELECT) 🔹 DCL (Data Control Language) – Manage access (GRANT, REVOKE) 🔹 TCL (Transaction Control Language) – Control transactions (COMMIT, ROLLBACK, SAVEPOINT) 💡 Why this matters? Mastering these commands gives you a strong foundation for data analysis, reporting, and real-world projects. 📊 Start with basics → Practice daily → Build real projects #SQL #DataAnalytics #DataScience #SQLBasics #Learning #CareerGrowth #DataAnalyst #TechSkills #OpenToWork #Beginners
To view or add a comment, sign in
-
-
🚀 **SQL Window Functions changed the way I analyze data.** When I first started learning SQL, I mostly relied on **GROUP BY** for aggregations. But I quickly realized one limitation: once you group the data, you lose the row-level details. That’s when I discovered **Window Functions** — and it completely changed how I think about SQL queries. Instead of collapsing rows, window functions allow you to **perform calculations across rows while keeping the original data intact**. With concepts like **ROW_NUMBER(), RANK(), DENSE_RANK(), LEAD(), LAG(), and running totals**, SQL becomes much more powerful for real analytical work. The more I explore SQL, the more I realize that **small concepts can unlock powerful data insights**. #SQL #DataAnalytics #WindowFunctions #LearningInPublic #DataSkills #OpenToWork
To view or add a comment, sign in
-
One concept in SQL that genuinely confused me at the beginning was: Subquery vs CTE vs Views vs Temporary Tables At first, all of them felt like just different ways of writing queries. But once I started using them in actual problems, the differences became clearer. Here’s how I now look at them: — Subqueries → Useful for quick filtering or calculations inside a query — CTEs → Make complex queries more readable and easier to debug — Views → Act as a reusable layer, especially for larger datasets or dashboards — Temporary Tables → Help break problems into steps and store intermediate results The real learning wasn’t the syntax — it was understanding when to use what Also realized something simple: SQL is not just about getting the output, it’s about writing queries that are clean, readable, and make sense. #SQL #DataAnalytics #OpenToWork #ActivelyLooking #DataAnalyst
To view or add a comment, sign in
More from this author
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development