Module 3: SQL Queries Flashcards

1
Q

SQL

A

Structured Query Language

Large data sets.

Tool that makes working with large datasets easier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Relational Database

A

A database that contains a series of tables that can be connected to form relationships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Features of SQL

A

Larger Datasets -
Access tables across a database - can pull information from different sources in the database.

Prepare data for further analysis in another software

Fast and powerful functionality
Great for collaborative work and tracking queries run by all users.

A language used to interact with different databases

Stored across a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Features of spreadsheets

A

Smaller data sets - Data that you input.
Enter data manually
Create graphs and visualisations in the same program
Built-in spell check and other useful functions
best when working solo on a project

Generate with a program

Stored locally

Build in functionalities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Commonality between spreedsheets and SQL

A

Use formulars, use arthimatite. and join data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

INSERT INTO

A

Allows you to insert a new data entry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

UPDATE and SET

A

Allows you to update a address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

DISTINCT in SELECT

A

Can allow you to remove duplicates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is one thing you should remember from the FROM statement

A

Located in a data so in the FROM section of an SQL query, you have to remember that the data is protected by the personal project name therefore the template of the file path structuring the structure:

personalprojectname.customer_data.customer_address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Text Strings

A

A group of characters within a cell, commonly composed of letter, numbers, or both

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How can using Length filter and clean data

A

You can use length to identify how many text string characters are within a table.

Such as, if the country name is meant 2 characters long you can use length to identify if there are any places where the text string is longer than meant to be for example

WHERE
LENGTH(state) > 2

And any rows with more than two characters will be identified.

OH for example if is a result of the above query then it is known that there is an additional space within the role highlighting in error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can TRIM be used to filter and clean data

A

If the text combo TRIM can be used to only pull the data that is relevant to the command that you provide it.

For example if you use TRIM to eliminate any spaces within both sets of data you can do so by only adding in the text string that you want to receive back, the query will then eliminate any additional characters or strings that you have not provided while still bringing back the relevant information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

CAST()

A

Can be used to convert anything from one data type to another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Typecasting

A

Converting data from one type to another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Float

A

Number that contains a decimal

17
Q

Why would you use FLOAT instead of UPDATE?

A

It would be preferable to use the Cast function instead the update function if the data type of the column has been mislabelled.

18
Q

CONCAT()

A

Adds strings together to create new text strings that can be used as unqiue keys

18
Q

How do queries within SQL make it particularly useful in relation to original datasets

A

SQL in a nondestructive way will manipulate and transform data without damaging or changing the original data set. However is still always important to ensure that you retain the original data set document in its original form or backups as errors often happen when manipulating original data, the sources say viewers a data analyst a lot of more work.

19
Q

COALESCE()

A

Can be used to return non-null values in a list

20
Q
A