25th Feb 2021 10 minutes read How Much SQL Practice Do You Need to Become a Pro? Timothy Edison sql learn sql online practice sql practice Table of Contents How Deep Should You Dive Into SQL? How to Practice SQL Top 6 SQL Concepts to Know, From Beginner to Advanced Beginner 1. Basic Understanding of Databases 2. Simple SQL Queries Intermediate 3. Views 4. Joins Advanced 5. Advanced SQL Queries 6. The Differences Between RDBMSs Time for SQL Practice! Are you wondering how long it will take to learn and practice SQL before you can call yourself a pro? In this article, I will try to help you answer this question. Being a pro in SQL can mean many different things. Some people would say that being a professional is about mastery of advanced SQL, i.e. window functions or complex subqueries. For other people, being a professional means getting paid for your skills. That’s also a valid point of view. In fact, that’s the definition of the word. In my opinion, being considered a professional depends on the person you’re talking to. For a junior DBA (database architect, someone who creates and manages databases) who’s talking with someone who’s been working in his field for 10 years, the colleague is a pro. But imagine a conversation between this same junior DBA talking with a college freshman. The student would probably consider the junior DBA a pro. However you choose to define being a pro, there are ways of getting better in SQL, which I’ll explain later in this article. First, though, remember that the more you learn, the more you understand that there’s a lot that you still don’t know. But don’t worry too much; knowing there’s more to know means you’re heading in the right direction. Furthermore, LearnSQL.com has tons of courses that go from beginner to advanced and can help you progress quickly and achieve your goals! How Deep Should You Dive Into SQL? The first question you should ask yourself is “What do I want to get with my SQL skills?”. Ultimately – unless you want to learn and practice SQL as a hobby and you don’t plan on pursuing a career – your level of advancement should be adapted to your everyday needs. In other words, what you need to know depends on the job you want. For example, if you’re a marketer, SQL is not a must-have tool – but having a basic understanding of how a database works and how data can be used is a good skill. That way, you don’t have to rely too much on engineers or a data team when you need to grab some metrics. You could build your own SQL queries and get the data you need by yourself. This skill is particularly useful in startups,where you are less likely to have a dedicated data team. If you’re a marketer and you want to learn SQL, check out our list of the best SQL courses for your industry. If your plan is to become a data analyst, SQL becomes a much more important skill. Unless your company is outsourcing the warehousing of its data (in which case, you could probably get pre-built reports from the warehouse), you will have to pull your own data. This means that you can essentially focus on SQL practice directed towards SELECT statements. Pairing SQL with others required for data analysis (Python, R, probabilities, etc.), you should be able to find a position quickly enough. Here are some tips for analysts looking for good SQL courses. Data engineering roles get much more complex than what I explained briefly above. Metadata management is a common issue nowadays; it deals with organizing information about data, i.e. data about the data, if you will. As databases get larger, data engineers need to find ways to store and access dataset descriptions. Another example is the integration of multiple data systems; data in a system comes from multiple sources and has to go to multiple destinations. So the movement of data has to be facilitated by tools that can handle the different inputs and outputs. To summarize, a data analyst and a marketer would have no need to go deeper than what I explained above. Of course, they could certainly pursue advanced SQL if they wanted to; it's always worth developing and expanding your skills. After all, being a professional requires constant improvement. Database architects, data engineers, and the like would need a more in-depth understanding of SQL. How to Practice SQL SQL is a declarative language: this means that you can ask for what you want without having to tell the database how to do it. With motivation and time, you will quickly reach a level of SQL that will allow you to get useful information and data! But to get there, you need to put in the hours – not just in reading about SQL, but in writing queries, making mistakes, and figuring out how to fix them. Ideally, you should use interactive online courses that offer real-time feedback on your queries. On LearnSQL, all our courses use an online platform. They’re also self-paced, which means that you can spend as much time as you want per day. Here is a quick guide on how to practice SQL with LearnSQL. Don’t worry if you’re not an IT person; you don’t need any computer science background to learn SQL. However, many beginners do make mistakes that slow their progress or cause them to quit learning altogether; I recommend reading 5 Reasons You Might Fail to Learn SQL, which was written by someone that was in the same position as you are right now. She helps you avoid those traps. Lastly, think about SQL practice like this: An hour every day for one year amounts to more than 15 full days of SQL practice. It’s definitely worth your time if you’re planning to pursue a career in IT or if you want to refresh your SQL skills. To see a learning path you could follow and the positions you could apply to afterwards, read this article. Top 6 SQL Concepts to Know, From Beginner to Advanced The next logical question is “What should I practice?”. I’ll review some key concepts at various levels of SQL mastery. This should help you get an idea of where to direct your efforts. Beginner 1. Basic Understanding of Databases Having a basic understanding of how a database works, how the data is organized, the common possible structures and relations is one of the most important foundations for learning SQL. You will rely on it to learn the rest. A database is made up of tables that contain information about a specific topic. For example, a company might have a customer table that has information about each customer: name, phone number, signup date, etc. Each of these pieces of information (which are stored as columns in the table and correspond to the columns you’d find in an Excel spreadsheet) has a different data type. Data types can be numbers, dates, text, etc. For a more detailed answer, check out these basic SQL concepts and terms. 2. Simple SQL Queries Simple SQL queries can get you pretty far if you have a good understanding of them. Here's a course that covers the basics of SQL. It’ll teach you theory and give you a neat place to write and test your queries. Be careful to avoid mistakes in your queries’ syntax. This is easier said than done, but simple errors in your SQL code can lead to some major issues down the line. Of course, everyone makes mistakes at first, and that’s okay as long as you learn from them; practice makes SQL perfect. Intermediate 3. Views Views are a kind of “virtual table” created from an SQL query. You can create a view by selecting one or more columns from one or more tables. These tables are the view’s underlying tables; the idea of a view is to see the data rather than to modify the underlying tables. Views are really practical. They make it possible for you to: Structure the data in the best way for certain users. Allow users to access data without giving them access to the underlying tables. Allow users to see only some of the data. If you have a table that stores usernames, passwords, etc., you might not want everyone to have access to the passwords. So you can create a view that shows only non-sensitive data. Our Working with Views course explains how to create, manage, and work with views. Even so, I’ll give you a quick example here. Let's say that you want to have a table showing customers and their addresses. Right now, this information is in two tables, customer and address. You can create a view that takes data from both the customer and address tables. First, we create our view. I’ll call mine customer_address. Now for the SQL code: CREATE VIEW customer_address AS SELECT customer.username, customer.id, address.city, address.id, address.street, address.customer_id FROM customer, address WHERE customer.id=address.customer_id; First, we have our CREATE VIEW command, where we enter the name of the view. Then we select the columns to be included in the view: first comes the table name, then a dot, and then the column name. This tells the database which tables to find the columns in; there can be columns in different tables that share the same name (like the id column). Next, we list the tables we’re selecting FROM (customer and address). Lastly, we have the WHERE clause, which says to match customer IDs to the customer ID records in the address table (customer.id=address.customer_id). This links customers and their addresses. If the customer has multiple addresses, this puts all the addresses linked to that customer in one row. It’s the most logical way to organize the information. 4. Joins Joins are a way to explicitly gather data from multiple tables. You won’t always have all the data you need in one table. You could get data from multiple tables with a simple SELECT FROM statement, but JOIN allows you to use SQL’s numerous handy built-in functions. And you might need to specify INNER, OUTER, LEFT or RIGHT JOIN, which fine-tune what data is returned from the joined database tables. Here’s an article that explains in detail how JOINs work. If you want to master SQL JOINs, I recommend our SQL JOINs course, which has over 90 interactive exercises for you to practice on. Advanced 5. Advanced SQL Queries Advanced SQL topics include window functions, CTEs and using special versions of the GROUP BY clause. All of these come in handy at times and are definitely mandatory to practice if you plan on getting your SQL skills to the next level. Our Advanced SQL track will help you out here. 6. The Differences Between RDBMSs Being proficient in one relational database management system (RDBMS) is a useful skill, but what you should really know are the main differences between popular database systems. That will come in handy when choosing an RDBMS for a project; sometimes SQL Server will be better, sometimes MySQL will. Knowing the advantages and disadvantages is also useful when your customer is already using a particular RDBMS. If you want to focus on one particular RDBMS, we have a practice set for PostgreSQL, one of the most popular DBMSs out there, that should come in handy. You won’t be completely done after learning these skills; keeping your SQL knowledge current is a lifelong process. But you’ll have a good understanding of the SQL language that you can build on. Time for SQL Practice! How long will it take you to become an SQL pro? It doesn’t happen overnight. A lot depends on how much you can (or will) dedicate to learning this language. More importantly, you really have to put everything you have learned into action: you have to practice SQL. Knowing a lot of theory without practice would be pointless. If you get hired to actually work with SQL, you wouldn’t know what to do. For every skill that I recommended above, there are useful practice sets and courses. I also recommend you make your own personal SQL projects. If you’re in need of practice problems or datasets, here’s a helpful guide to coming up with some ideas. You can take a break from the exercises when you feel like the concepts are too blurry. Afterwards, come back to them (maybe after reading some more articles or taking another course) and learn a bit more. You can progress to being an SQL professional as long as you’re willing to put in the time and effort. Tags: sql learn sql online practice sql practice