SQL Tricks & Tips Flashcards

1
Q

NO SQL means:

A

Not Only Sequel

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

In T-SQL, what command will return only the first 1000 rows of a SELECT query?

A

top 1000

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

Which type of join will only return results where the condition is true?

A

inner

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

What type of filter condition can you use to return rows with a date value within a range?

A

between

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

What must you also include in a SELECT statement when performing an aggregation?

A

group by

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

Which function in T-SQL allows you to perform an aggregation across a range of rows?

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

Which SELECT clause can you use to test if the outer queries value is present in the sub-query

A

exists

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

To calculate a running total, what range should you use in your OVER clause?

A

rows unbounded preceding

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

In T-SQL, what date function will return the last day of a given month?

A

eomonth

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

Which clause do you use to create a common table expression in T-SQL?

A

with

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

Besides the rank() function, what t-sql method can you use to return a ranking of results?

A

row_number

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