Which woman designers have an annual salary over $22,000?
Exampes
1.SELECT LASTNAME, SALARY
FROM EMP
WHERE SALARY > 22000
AND JOB = 'DESIGNER'
AND SEX = 'F'
Who makes more than $40,000 or is a manager?
2.SELECT LASTNAME, FIRSTNAME, SALARY, JOB
FROM EMP
WHERE SALARY > 40000 OR
JOB = 'MANAGER'
3.Which Filed Rep makes more than $2,000 in commissions or who has an education lever higher then 18?
SELECT LASTNAME, JOB, COMM
FROM EMP
WHERE (COMM > 2000 AND JOB = 'FIELDREP')
OR EDLEVEL > 16
4.SELECT LASTNAME, JOB, COMM
FROM EMP
WHERE COMM > 2000 AND (JOB = 'FIELDREP'
OR EDLEVEL > 16)
Labels
- AVG() Function (1)
- Aggregate Functions (1)
- Candidate Key (1)
- Composite and Compound Keys (1)
- EXISTS (1)
- FIRST() Function (1)
- Group By Statement (1)
- Having Clause (1)
- INSERT (1)
- LIKE (1)
- SELECT AS CLAUSE (1)
- SQL Distinct Unique Records (1)
- SQL IN (1)
- SQL Joins (1)
- SQL Last() Function (1)
- SQL NULL Conditional (1)
- SQL Not Exists (1)
- SQLComparison Operators (1)
- Sql Max() Function (1)
- Sql Min() Function (1)
- Sql SUM() Function (1)
- WHERE (1)
Blog Archive
-
▼
2010
(73)
-
▼
May
(40)
- Generate Mapping against target Step
- Pentaho Spoon Installation
- Group by SQL Query
- How to Insert Extracted Values in Pentaho Spoon
- Loading XML Data Using Pentaho ETL Tool
- SQL Query For Monthly Calculation
- Concatenation in Pentaho Kettle
- How to Split a String in pentaho Kettle
- Date to String Conversion in Pentaho Kettle
- How to get Distinct Count in Pentaho
- How to Write ETL Script in Pentaho
- Check Table Column Existence in Pentaho
- Performing Calculations in Pentaho Spoon
- Aggregate Functions in Pentaho Spoon
- What is Checksum in Pentaho Spoon
- Hex to integer Conversion in Kettle
- How to Set Environment Variables in Kettle
- What is Get Variable in Pentaho Kettle
- What is Set Variable in Pentaho Kettle
- Storing Transformations and Jobs in local Files Sy...
- What is Pentaho
- ETL Scripting with Open Source ETL Tools
- SELECT AS CLAUSE
- Calculations in SQL Query
- SQL Distinct Unique Records
- SQL IN, NOT IN and NOT BETWEEN Clauses
- SQL Between Clause
- SQL Multiple Conditional Queries
- SQL NULL Conditional Queries
- SQL Comparison Operators
- Candidate Key
- Super Key
- Composite & Compound keys
- Foreign key
- Alternate or Secondary Key
- Surrogate Key
- Unique key
- Primary Key
- Database Keys
- What Nomalization is?
-
▼
May
(40)
Saturday, May 8, 2010
SQL Multiple Conditional Queries
at
10:03 PM
Posted by
M.Junaid Khan
0
comments
Posted under :
SQL Multiple Conditional Queries
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment