Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

fundata2

TermDefinition
Single Table Query The SELECT command is used to retrieve data from a database.
SELECT-FROM-WHERE basic form of the SELECT command
Basic Queries Select All Columns (*) To retrieve all columns from a table, use an asterisk *
SELECT * FROM table_name; Syntax of retrieving all columns
SELECT * FROM PART; To list the complete PART table
SELECT column1, column2 FROM table_name; Syntax of specific tables:
Select Specific Columns List the column names you want to see
SELECT CUSTOMER_NUM, CUSTOMER_NAME, BALANCE FROM CUSTOMER; To list the number, name, and balance for all customers
Filtering with WHERE the WHERE clause restricts the rows returned by a query
Simple Condition Uses a comparison operator (=, >, <, <>, !=, etc.)
SELECT CUSTOMER_NAME FROM CUSTOMER WHERE CUSTOMER_NUM = ‘148’; Find the name of customer number of number 148
Compound Condition (AND, OR, NOT) Connects two or more simple conditions
Example (AND): SELECT DESCRIPTION FROM PART WHERE WAREHOUSE = ‘3’; AND ON_HAND > 25;
Example (OR): SELECT DESCRIPTION FROM PART WHERE WAREHOUSE = ‘3’; OR ON_HAND > 25;
BETWEEN Operator Selects values within a given range, inclusive
SELECT CUSTOMER_NUM, CUSTOMER_NAME, BALANCE FROM CUSTOMER WHERE BALANCE BETWEEN 2000 AND 5000; List customers with balances between $2,000 and $5,000.
LIKE Operator Used for pattern matching in character strings. % represents any collection of characters, and _ represents any single character.
List customers on a street containing ‘Central’ SELECT CUSTOMER_NUM, CUSTOMER_NAME, STREET FROM CUSTOMER WHERE STREET LIKE ‘%Central%’;
IN Operator Checks if a value matches any value in a list.
List customers with a credit limit of $5,000, $10,000, or $15,00049 SELECT CUSTOMER_NUM, CUSTOMER_NAME, CREDIT_LIMIT FROM CUSTOMER WHERE CREDIT_LIMIT IN (5000, 10000, 15000);
IS NULL Operator Finds rows where a column’s value is unknown.
List customers with an unknown street value SELECT CUSTOMER_NUM, CUSTOMER_NAME FROM CUSTOMER WHERE STREET IS NULL;
Computed Columns you can perform calculations on columns directly in the SELECT clause
AS Used to assign a name to the resulting column.
Syntax for Computed Columns SELECT column1, (column2 - column3) AS new_column_name FROM table_name;
Find the available credit for each customer SELECT CUSTOMER_NUM, CUSTOMER_NAME, (CREDIT_LIMIT - BALANCE) AS AVAILABLE_CREDIT FROM CUSTOMER;
Sorting with ORDER BY the ORDER BY clause sorts the results. The default is ascending (ASC). Use DESC for descending order.
Syntax for sorting results SELECT column1, column2 FROM table_name ORDER BY column_to_sort [ASC|DESC];
List customers ordered by their balance SELECT CUSTOMER_NUM, CUSTOMER_NAME, BALANCE FROM CUSTOMER ORDER BY BALANCE;
Grouping and Aggregate Functions Aggregate functions perform a calculation on a set of rows and return a single value.
COUNT() Counts the number of rows
SUM() Calculates the total of values in a numeric column.
AVG() Calculates the average value in a numeric column.
MAX() Determines the maximum value in a column.
MIN() Determines the minimum value in a column.
GROUP BY Clause Groups rows that have the same values into summary rows.
For each sales rep, find their number and the average balance of their customers. SELECT REP_NUM, AVG(BALANCE) FROM CUSTOMER GROUP BY REP_NUM;
Created by: vancejoy
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards