• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/18

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

18 Cards in this Set

  • Front
  • Back
ESCAPE
may be used with the LIKE operator for a comparison involving the literal version of one of these two special characters, in their literal form. Example: WHERE name LIKE '%\_Simpson' ESCAPE '\'; This means don't treat this underscore the same way we treat the other underscore. The slash is an escape character. Another example: WHERE column1 LIKE "110\%" escape "\";
ORDER BY
The is a clause within the SELECT statment/clause. Required to guarantee desired order. Can order by column name, column name alias, interger representing position of sort-by column in SELECT statement, an SQL expression [e.g.(y-mean(y))**2] Defalut order is ascending (Missing values come first). Add DESC after column name to specify descending. syntax: ORDER BY DESC, order by item DESC. replaces the need to proc sort before printing in some cases
Where is the PROc SQL mistake? proc sql data=orion.emplyee-donations
"data=" not needed
Where is the PROc SQL mistake? SELECT employee_id Qtr1
needs a comman inbetween columns names
Where is the PROc SQL mistake? order by then where
Where clause comes before order by clause
short form for DESCENDING
DESC
fcn(col1, col2, col3)
action performed across non-missing columns. If there is a column with no data, it will be ignored
fcn(col1)
action performed down non-missing rows
avg in SQL is what in SAS?
mean
count in SQL is what in SAS?
freq
max, min, sum in SQL is what in SAS?
max, min, sum
how to create a column name on a new calculation?
need to define with "as

what is happenning here?



ORDER BY 6 DESC 1;

this will order the report by the sixth column named in the SELECT statement/clause in descending order then by the first column named in the SELECT statment/clause in ascending order

add a label
SELECT col1, col2, col3 label='max donation' This will define a label for col3
add a format
SELECT col1, col2, col3 format=dollar5. This will set a format for col3
COUNT
returns the number of rows returned by a query. syntax: select count(*) as Count label='Employee Count" from..... Only one column or no columns are allowed to operate the count function. You could also put an asterisk inside the column
DISTINCT with COUNT
returns the number of non-missing distinct values of a column returned by a query
GROUP BY
group data based on the values of one or more columns. calculate statistics for each distinct value of the grouping columns. syntax: GROUP BY