AI Programming
11.2K subscribers
594 photos
42 videos
245 files
568 links
An artificial intelligence free resource channel for students, professionals, and anyone who wants to learn how to solve problems.

ENGINEERING πŸŽ– PROGRAMMING πŸŽ– TIPS & HACKS

https://youtube.com/c/AIProgramming
CONTACT US ON: @alphadmin12
Download Telegram
πŸ˜‚ have a break have a joke πŸ˜‚
Database : Oracle Functions πŸ“ƒπŸ“Žβ¬‡οΈ
Channel name was changed to Β«AI ProgrammingΒ»
Channel name was changed to Β«A.I. ProgrammingΒ»
πŸ“ŽπŸ—“ Figure DB 1.1
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
| Database Exercise Questions |
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
N.B. Consider the database shown above in Figure DB 1.1, whose schema is shown and do the practical exercises below.

(We assume you have installed Oracle’s default HR(Human Resource) database, it’s comes as a compacted package within the Oracle Enterprise 11G program.)
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
Exercise Instruction : Write the SQL command used to manipulate in Oracle SQL Command Line program.

β€’Ex 1β€’ Select and display all records from jobs table where it’s job title words started with β€˜A’ character

β€’Ex 2β€’ Display different /not duplicated/ maximum & minimum values of records from jobs table

β€’Ex 3β€’ Display department names records from departments table whose location ID’s are 1700

β€’Ex 4β€’ Display all records of jobs table in minimum salary ascending order whose job title had β€˜P’ character in it

β€’Ex 5β€’ Display first & last name, email, and salary records of employees table whose first name ends with character β€˜y’ in email descending order

β€’Ex 6β€’ Display first name, last name and salary records from employees table whose salary is either 12008 or 3000

β€’Ex 7β€’ Display city and postal code records whose last character of city record neither ends with β€˜y’, β€˜e’ nor β€˜a’ from locations table

β€’Ex 8β€’ Display employee Id, first name, phone number and email records from employees table whose hires 4000 days before server date

β€’Ex 9β€’ Display average, minimum and maximum salary values only by using functions from employees table

β€’Ex 10β€’ Display employees of first name, last name and salary records whose hire date is January 07 2002 and whose salary is either 6500 or 8300

For SQL Commands reference please review the pdf short note attached and pined earlier.

AI Programming @freecodecs

Have a LitπŸ”₯ Practice Folks πŸ™ŒπŸ½
AI Programming pinned Β«β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” | Database Exercise Questions | β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” N.B. Consider the database shown above in Figure DB 1.1, whose schema is shown and do the practical exercises below. (We assume you have installed Oracle’s default HR(Human Resource)…»
Using Run SQL Command Line
We described the full steps on below post ⬇️

AI Programming @freecodecs
Hope this will be helpful πŸ™πŸ½
Steps Using Run SQL Command Line
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
Step 1: Open Run SQL Command Line

Step 2: Write and enter the following without quotations and semicolon
β€˜connect system’

Step 3: Enter your password which is you gave when you install Oracle Enterprise program and press enter(*you won’t see it when you write it’s just blank)

Step 4: Alter the HR database account to access it every time - write and enter the following without the quotation and with the semicolon this time
β€˜alter user hr account unlock;’

Step 5: Now create user and password for manipulation of HR account - also write enter the following without the quotation and with semicolon
β€˜alter user hr identified by hr;’

Step 6: Write and enter β€˜connect’ then enter user name & pass, write and enter twice β€˜hr’ for the username and password

β€’NBβ€’ Now you can use the Oracle SQL Program anytime but when you use it on next launch which is after exiting and starting again skip Step 4 & 5

AI Programming @freecodecs
As always :
Have a Lit πŸ”₯ Practice Folks πŸ™ŒπŸ½
AI Programming
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” | Database Exercise Questions | β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” N.B. Consider the database shown above in Figure DB 1.1, whose schema is shown and do the practical exercises below. (We assume you have installed Oracle’s default HR(Human Resource)…
DB - Oracle Exercise 1 :Answers
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
β€’Ans Ex 1
SELECT * FROM JOBS WHERE JOB_TITLE LIKE β€˜%A_%’;

β€’Ans Ex 2
SELECT DISTINCT MIN_SALARY, MAX_SALARY FROM JOBS;

β€’Ans Ex 3
SELECT DEPARTMENT_NAME FROM DEPARTMENTS WHERE LOCATION_ID = 1700;

β€’Ans Ex 4
SELECT * FROM JOBS WHERE JOB_TITLE LIKE β€˜%P%’ ORDER BY MIN_SALARY;
(SELECT * FROM JOBS WHERE JOB_TITLE LIKE β€˜%P%’ ORDER BY ASC MIN_SALARY;)

β€’Ans Ex 5
SELECT FIRST_NAME, LAST_NAME, EMAIL, SALARY FROM EMPLOYEES WHERE FIRST_NAME LIKE β€˜%y’ ORDER BY EMAIL DESC;

β€’Ans Ex 6
SELECT FIRST_NAME, LAST_NAME, SALARY FROM EMPLOYEES WHERE SALARY = 12008 OR SALARY = 3000;

β€’Ans Ex 7
SELECT CITY, POSTAL_CODE FROM LOCATIONS WHERE CITY NOT LIKE β€˜%e’ AND CITY NOT LIKE β€˜%y’ AND CITY NOT LIKE β€˜%a’;

β€’Ans Ex 8
SELECT EMPLOYEE_ID, FIRST_NAME, PHONE_NUMBER, EMAIL FROM EMPLOYEES WHERE HIRE_DATE > SYSDATE - 4000;

β€’Ans Ex 9
SELECT MAX(SALARY) as β€œMax Salary”, MIN(SALARY) as β€œMin Salary”, AVG(SALARY) as β€œAverage Salary” FROM EMPLOYEES;

β€’Ans Ex 10
SELECT FIRST_NAME, LAST_NAME, SALARY FROM EMPLOYEES WHERE HIRE_DATE = β€˜07-JUN-02’ AND (SALARY = 6500 OR SALARY = 8300);

AI Programming @freecodecs
πŸ˜‚ have a break have a joke πŸ˜‚
Let’s close 2018 tag and .... Happy New Year πŸŽ† Folks
Programmer lifeπŸ˜‚πŸ˜‚πŸ˜‚πŸ‘‡πŸ‘‡