Telecall Technology
WTI Cabs Interview Questions and Answers
Q1. Nth Highest Salary in SQL. Fetch Duplicate records in SQL. Write shell script to print febonicci series.
SQL query to find Nth highest salary, fetch duplicate records, and shell script for Fibonacci series.
To find Nth highest salary in SQL, use the 'ROW_NUMBER()' function with 'ORDER BY' and 'LIMIT'. Example: SELECT salary FROM (SELECT salary, ROW_NUMBER() OVER (ORDER BY salary DESC) AS rn FROM employees) AS temp WHERE rn = N;
To fetch duplicate records in SQL, use the 'GROUP BY' and 'HAVING' clauses. Example: SELECT column1, column2, COUNT(*) FROM table_name GROUP BY column1, co...read more
Q2. Write a shell script to check system health.
A shell script to check system health
Check CPU usage using 'top' or 'ps' command
Check memory usage using 'free' or 'top' command
Check disk usage using 'df' command
Check network connectivity using 'ping' command
Check system load using 'uptime' command
Check running processes using 'ps' command
Q3. Use For loop to fetch febonnici series
Using a for loop to fetch the Fibonacci series.
Initialize variables for the first two numbers in the series (0 and 1).
Use a for loop to calculate the next number in the series by adding the previous two numbers.
Store each number in the series in an array.
Continue the loop until reaching the desired length of the series.
Q4. Duplicate records delete In sql
To delete duplicate records in SQL, you can use the DELETE statement with a subquery.
Identify the duplicate records using a SELECT statement with GROUP BY and HAVING clause.
Create a subquery to select the duplicate records.
Use the DELETE statement with the subquery to delete the duplicate records.
Q5. Highest salary in SQL
The highest salary in SQL can vary depending on factors such as location, experience, and industry.
The highest salary in SQL is typically found in roles such as database administrators, data engineers, and data architects.
Factors that can influence the highest salary include the candidate's level of experience, the location of the job, and the industry.
For example, a senior database administrator in a major tech hub like Silicon Valley may command a higher salary compared to ...read more
Q6. use dense rank function
Dense rank function assigns a rank to each row within a partition of a result set, with no gaps in the ranking values.
Use the DENSE_RANK() function in SQL to assign a unique rank to each row within a partition
It is similar to the RANK() function but does not leave gaps in the ranking values
Example: SELECT column1, DENSE_RANK() OVER (PARTITION BY column2 ORDER BY column3) AS dense_rank FROM table_name
Q7. Grep command in unjx
Grep command is used in Unix to search for specific patterns in files.
Grep stands for Global Regular Expression Print.
It is a powerful command-line tool for searching text files.
It uses regular expressions to match patterns.
Grep can search for patterns in a single file or multiple files.
It can also search recursively in directories.
Grep has various options to control the search behavior.
Some common options include -i (ignore case), -r (recursive search), -l (list files with m...read more
Q8. Awk command in unux
Awk command in Unix is a powerful text processing tool used for extracting and manipulating data.
Awk command is used for pattern scanning and processing of text files.
It allows you to specify patterns and actions to be performed on those patterns.
Awk operates on a line-by-line basis, processing one line at a time.
It can be used to extract specific columns from a file, perform calculations, and generate reports.
Awk uses a set of built-in variables and functions for text proces...read more
Q9. Use Having Clause
The HAVING clause is used in SQL to filter groups based on a specified condition.
HAVING clause is used with the GROUP BY clause to filter groups based on a specified condition
It is used to filter the results after grouping has been done
It is similar to the WHERE clause but operates on grouped records
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month