Posts

F4 Code

 Q1: MySQL : Employee Data Database Name to be used EmployeeData Problem Statement Write a standard SQL query that will return the value of ‘EMPID’ and “EMPNAME” for those employees who earn more than their managers. Additionally, the query will return the salary of an employee as column name “EMPSALARY” and the salary of a manager as column name “MANAGERSALARY”. The rows should be returned in the increasing order of EMPID.  Column Name: EMPID, EMPNAME, EMPSALARY, MANAGERSALARY Ans: select E.EMPID, E.EMPNAME, E.SALARY AS EMPSALARY, M.SALARY AS MANAGERSALARY from TBLEMPLOYEE E join TBLEMPLOYEE M on E.MANAGERID = M.EMPID AND E.SALARY > M.SALARY ORDER BY EMPID;  Q2. MySQL : Employee Data Type of Database MySQL Database Name to be used SocialData Problem Statement Write a SQL query to find the top 4 most active users on a social media platform, where activity is defined as the maximum number of posts created. The query should include a column called the...

F3 Code

  1. HIGH SCORE   cut -d '|' -f 2,5 tmp/prog.txt | sort -t '|' -k2,2nr | awk '{print $1$2}' | head -n 3   output: AlexaAndrews FionaFerguson EddieEricsson ----------------------------------------------------------------------------------------------------------------------------------- 2. LINE NUMBERS   read -p "Enter the word" word result=$(grep -ni "$word" introduction.txt) echo $result   output: Enter the word :Alarum 1:I introduce to you, Alarum 4: This is where I find Alarum -------------------------------------------------------------------------------------------------------------------------------------- 3. ’THE’ CODE   grep -i   “the”   filename.txt                   (or) Filename =” “ grep -i “the” $filename.txt output: -i    ===== รจ     it is case insensitive ---------------------...