SQL
SQL
SQL
1. Data lives in databases. Just about every company and organization
relies on some form of database to store and organize information.
TRUE
A query is a way to access only the data you are interested in.
REVIEW
1. A database is an organized collection of data
2. SQL is used to work with the data in a database
Debugging
1. If your SQL query contains a mistake, you’ll not be able to access the
data.
2. A schema is a visual representation of how a database is organized,
showing its tables, fields and keys. Arrows are used to show how the
different tables are related.
3. The * symbol allows you to select all the fields in a table. This way
you can avoid typos when listing field names.
⭐ SQL queries are organized in different lines so they are easier to read by
humans
REVIEW
Limiting Data
1. The LIMIT keyword extracts a limited number of records.
GG SHEETS
Bảng tính cho phép thực hiện nhiều nhiệm vụ chính trong qtrinh phân tích dữ
liệu:
Phân tích dữ liệu: là quá trình trích xuất những hiểu biết có nghĩa từ dl mặc
dù mỗi dự án sẽ có mtieu riêng nhưng hầu hết đều tuân theo 1 khuôn khổ
(Data analysis: process of extracting meaningful insights from data).
Các hàm tích hợp: Các phép tính được viết sẵn có trong các công thức
(Built-in functions: Pre-written calculations that are available in formulas).
Exploring data
Summary statistics
Categorical data: can only be one of a finite number of value (Dữ liệu
phân loại: chỉ có thể là một trong số hữu hạn các giá trị)
UNIQUE(range) find the number of unique values
Filtering
Extract subsets of the dataset for more detailed exploration (lọc dl hữu
ích cho việc khám phá dữ liệu)
FILTER(range, condition1, [condition2,…])
range: phạm vi
condition1: dữ liệu của phạm vi
condition2: điều kiện đề cho
MONTH(date)
WEEKDAY(date, [type])
HOUR(time)
MINUTE(time)
SECOND(time)
TODAY()
NOW()
Spreadsheet is refreshed (gtri hiển thi trong ô sẽ đc cập nhật bất cứ khi
nào bảng tính đc làm mới)
Removing whitespace:
Extra whitespace:
starting_at (default=1): chỉ mục bắt đầu tìm kiếm, theo mặc định là vtri bắt
đầu của văn bản
LEFT(string, [number_of_characters])
Conditional aggregations
COUNT()
SUM()
AVERAGE()
COUNTIF(range, criterrion)
Criterrion (tiêu chí)
o String (chuỗi) to match ex “United Kingdom”
o Number to match ex 150
o String containing a number and comparison operator ex “>9”
VLOOKUP
search_key: the value in main table to search for in the lookup table
range: the range containing the lookup table (usually absolute
references)
index (chỉ mục): the column index in the lookup table to return
is_sorted: TRUE/FALSE to indicate is the lookup table is sorted