当前位置:网站首页>[data analysis] five common questions about learning SQL?
[data analysis] five common questions about learning SQL?
2022-06-29 15:44:00 【Beginners of machine learning】
For small partners engaged in data work ,SQL Almost a necessary skill , Well written SQL It shows that you are a qualified ‘ Access migrant workers ’.
SQL How to go from rookie to expert , Just three steps :
- Familiar with basic addition, deletion, modification and query statements and functions , Include select、where、group by、having、order by、delete、insert、join、update etc. , You can do daily data retrieval or simple analysis ( This level has exceeded 90% Not IT colleagues );
- Master and skillfully use high-level grammar , For example, a collection 、 Group aggregation 、 Subquery 、 Conditional logic 、 String function 、 Arithmetic functions 、 Date time function , And know MySQL、Oracle、SQL Server And other database syntax differences ;
- Familiar with how to optimize SQL sentence , In order to achieve the highest query efficiency , Know the business 、 lock 、 Indexes 、 constraint 、 View 、 Metadata and other concepts , And learn to use hive sql、spark sql、pymysql Tools such as ;
It is better for data analysts to reach the third level , This can basically be a 90 Points of sqler.
If you put excel analogy sql, You have to play with the PivotTable 、 Various function formulas , even to the extent that VBA, To be able to work with maximum efficiency .
Study SQL There are laws to follow , You can start with the following five questions :
1. Understand what is SQL?
SQL, Full name **「Structured Query Language」**, That is, structured query statements , Its main function is design , Create and manage relational databases , Tables in relational databases are similar excel A two-dimensional table of , It's made up of lines , Each column represents a field . let me put it another way ,SQL Is a programming language for communicating with relational databases .
Relational databases have many , such as MySQl、Oracle etc. , Each database uses its own SQL dialect , But they all share the same basic syntax .
SQL My responsibility is to manage the two-dimensional table , Replace... With a statement excel The graphical commands in .
For example, it is also filtering data , stay excel You need to add a filter to the column name in , Then select the desired field , This is a graphical command ;SQL Filter is realized through statements ;
select * from table where ....
SQL Grammar can be divided into three categories :
- The statement used to define the data structure is called **「SQL Scheme statement 」**, such as CREATE TABLE student...
- Used to create 、 operation 、 A statement that retrieves data from a database is called **「SQL Data statements 」**, such as INSERTE INTO student...
- Used to start 、 end 、 Or rolling back a transaction is called **「SQL Transaction statement 」**
Simple understanding , A schema statement is a shell for building data , In the example, a table is created student; Data statement is to process data , In the example, the table student Inserted data , Multiple statements solve multiple transactions SQL Disputes during execution .
If you're a database administrator , Then you need to master pattern statements at the same time 、 Data statements and transaction statements , But if you're just an analyst using data 、 The programmer , Then you only need to master the data statements .
SQL Not like a programming language , Using variables 、 Conditional logic 、 Cycle structure defines the process , To get the desired results .SQL Go straight up and down , Just define the necessary inputs and outputs , There is no control over the process .
2. How to learn SQL?
First you need to understand SQL The basis of grammar , Include SELECT,FROM,WHERE,GROUP BY,HAVING,ORDER BY、LIMIT etc. .
Beginners don't know much about abstract concepts , You can contrast excel Study SQL Basic grammar .
The core :select * from tableName
This sentence is to select all fields from a table , amount to excel The choice in sheet
where amount to excel Screening ,group by amount to excel My PivotTable ,order amount to excel In ascending and descending order .
Then you have to learn some common functions :
Finally, master advanced usage :
3. What good books and tutorials are there ?
In the current market SQL There's a lot of relevant information , More fire like 《SQL Will know 》、《SQL Learning Guide 》 etc. .
There are also some good open source tutorials on the Internet , For example, rookie tutorial 、w3school etc. .
I suggest you finish a book or a set of tutorials , It can be done in a month .
4. What are they? SQL Actual combat website ?
Learn from practice SQL It's deadly , Maybe you've been studying for more than half a month , There is still no way to get a query demand , So practice is for SQL It's very important .
Here are two ways to practice SQL, First, build your own database , Then find a topic to practice , Second, in SQL Practice on the website
It's not difficult to build your own database , Beginners can install mysql, Then go to github Download exercises from .
SQL There are also many websites for practice , image SQLZOO、XUESQL、SQLBolt、leecode、 Niuke.com, etc .
SQL Tutorial/zh - SQLZOO
self-taught SQL network ( course video Practice the whole set )
5 . Practice practice
Practice is learning SQL The only way , Only practice enough , You can master SQL!
边栏推荐
- MCS: discrete random variable - binomial distribution
- Render follows, encapsulating a form and adding data to the table
- 极化SAR地表分类
- MCS: discrete random variable - Hyper geometric distribution
- Informatics Olympiad all in one 2061: trapezoidal area
- postgresql源码学习(23)—— 事务日志④-日志组装
- kotlin 注解声明与使用
- GWD: rotating target detection based on Gaussian Wasserstein distance | ICML 2021
- Chapter IX app project test (the end of this chapter)
- 12.UDP协议-bite
猜你喜欢

Implementing redis distributed locks using custom annotations

分页sql(rownum、row_number、dense_rank、rank)

EasyGBS调用获取实时快照接口时,出现白色方块该如何解决?

Excel中构建SQL语句

Render follows, encapsulating a form and adding data to the table

About sql+nosql: newsql database

13.TCP-bite

Cmake learning-2

MCS: discrete random variable - Hyper geometric distribution

Take another picture of cloud redis' improvement path
随机推荐
LeetCode-234-回文链表
遥感典型任务分析
Chapter IX app project test (the end of this chapter)
Flink SQL任务TaskManager内存设置
LeetCode-1188. 设计有限阻塞队列
14.IP协议-bite
雷达基本组成
再也不用担心窗体变形了
Kotlin annotation Statement and use
这是少了什么依赖嘛?FlinkSql打包运行的时候报错,但是本地idea跑的时候是没问题的,求解,谢
LeetCode-1188. Designing finite blocking queues
Informatics Olympiad all in one 1000: introductory test questions
cmake学习-2
绑定证券账户到同花顺安全吗?哪家券商开户后可以绑定同花顺
Development and application of NFT chain Games: Six noteworthy NFT trends in 2022
LeetCode笔记:Weekly Contest 299
MySQL为什么选择B+树存储索引
Rust Basics
Uncover the practice of Baidu intelligent test in the field of automatic test execution
卷积神经网络中各层的作用