Top X Sql In Addition To Unix Interview Questions For Programmers
The SQL in addition to UNIX are 2 of the most essential skills for whatever programmer. It doesn't affair whether you lot are applying for the task equally Java developer or C++ developer, Python developer or Ruby programmer, SQL in addition to UNIX ever have got closed to role to play inward your job. It's fifty-fifty of import for people who have got less to produce amongst programming similar application back upward guys, draw of piece of work concern analysts, projection managers, in addition to discipline affair experts. Hence, it's imperative for whatever programmer or information technology professional person to fix both SQL in addition to UNIX well before going for whatever task interview. This becomes fifty-fifty to a greater extent than of import if you lot are going for a back upward engineer role, rather for a evolution role because than the importance of SQL, Database, in addition to Linux science increases equally compared to programming linguistic communication you lot know.
Since the primary task of back upward professional person is to facial expression after production environment, which often runs on Linux, it's really of import for them to have got a goodness cognition of both Linux operating arrangement in addition to ascendency line.
They should know what they are doing because wrong exercise of grep or rm ascendency tin convey downward the whole production system. That's why they are extensively questioned in addition to tested inward their UNIX skill.
Same is truthful for SQL because most of the existent the world arrangement uses a relational database for backend similar Oracle, MySQL or Microsoft SQL Server in addition to back upward professionals often demand to run queries, study stored physical care for or write procedures to generate reports.
Just similar UNIX command, a careless SQL query equally good has potential to convey downward your production arrangement to halt in addition to you lot should ever produce due diligence before running whatever query against alive surround similar testing them inward UAT or QA surround before running them inward Production.
This unmarried thing has saved my life a dyad of times in addition to I have got jolted a dyad of points you lot should have got tending spell running queries on production or alive database, you lot tin discovery those tips here.
Because of these reasons, SQL in addition to UNIX transcend essential skills for whatever software back upward professional. If you lot intend you lot lack SQL in addition to Linux skills in addition to then I propose you lot to showtime transcend through a comprehensive course of study like The Complete SQL Bootcamp and Linux Command Line Basics before appearing whatever interviews. These courses are groovy to fill upward whatever gaps you lot have got inward your understanding.
This listing contains closed to of the questions which I intend really of import from a Java back upward perspective, in addition to many of them are genuinely asked inward existent interviews. If you lot are going for whatever Java back upward role, you lot tin await closed to SQL in addition to Linux questions along amongst Core Java questions.
I encourage you lot to transcend through this listing to acquire an thought of what to await inward existent Java back upward interview.
Btw, this is the minute component of my listing of interview questions for Java information technology back upward professional. In the first part, I have got shared thirty essential Java in addition to JEE questions in addition to inward this part, I'll percentage 17 SQL in addition to UNIX questions from diverse Java Support Interviews.
Anyway, hither are closed to of the often asked SQL in addition to UNIX questions from Programming Job interviews:
1) What volition hand when a TCP/IP customer stops consuming messages from Server but it's connected? Assume Server is continuously sending messages. (answer)
The message volition hold out stored on sending buffer at the sender halt because it volition halt receiving the ack from the receiver. If the server hold continues to force messages, the sending buffer volition overflow, throw an mistake to halt the server.
2) What guarantees are provided yesteryear TCP/IP? (answer)
The TCP/IP provides the guaranteed delivery but apart that it equally good provides ordering guarantee i.e. message volition hold out delivered to the customer inward the same fellowship they are sent from the sender.
This is i of the of import argue to consider TCP/IP for ordered messages e.g. orders in addition to trades inward the fiscal world.
Btw, if you lot desire to larn to a greater extent than nearly TCP protocol you lot tin encounter this here to discovery closed to goodness majority to larn to a greater extent than nearly TCP/IP protocol from application developer's perspective.
3) How produce you lot discovery the PID of a physical care for listening on port 8080? (answer)
If the physical care for is running on a Linux operating arrangement in addition to then it's pretty easy, only exercise the netstat ascendency to discovery the PID of the process, netstat -p shows the PID. Once you lot got the physical care for id, you lot tin exercise the ps ascendency to discovery the physical care for itself.
Btw, If you lot are non familiar amongst netstat, ps or telephone substitution Linux commands in addition to then I propose you lot to showtime transcend through answer)
This is i of the mutual province of affairs Java programmer face. In Linux, you lot tin exercise the discovery ascendency to search all large files. The discovery -size options listing the file amongst their sizes.
8) How produce you lot discovery the heap dump files inward Linux? (answer)
The heap dump files are by in addition to large inward the shape of java_pid.hprof, thence you lot tin easily search them using discovery ascendency inward Linux equally shown below:
9) How produce you lot discovery the files currently used yesteryear your Java process? (answer)
You tin exercise the lsof command to discovery all the files, including sockets yesteryear your Java physical care for inward Linux. The lsof command stands for listing opened upward files in addition to since everything inward UNIX is file it tin listing both normal files equally good equally opened upward socket connector yesteryear whatever process.
volition listing all files opened yesteryear coffee command, and,
volition listing all files opened yesteryear physical care for id 22342.
For a more in-depth discussion on using lsof command and its diverse open, I propose you lot transcend through the Linux Command Line Basics course on Udemy. It covers all basic Linux commands amongst real-world examples.
10) How produce you lot discovery the ports currently used yesteryear a Java process? (answer)
You tin exercise the netstat or lsof ascendency to discovery all the ports currently used yesteryear a Java process, but for that, you lot demand the physical care for id of your Java process. You tin discovery the PID using ps in addition to grep ascendency equally shown below:
$ ps -ef | grep coffee | grep myprocess
Once you lot discovery the PID of your Java process, you lot tin exercise the netstat command to discovery the ports currently used this Java physical care for equally shown inward the next example:
$ netstat -nap | grep PID
If netstat is non available on your Linux machine you lot tin equally good exercise the lsof ascendency to discovery all the ports used yesteryear a Java physical care for equally shown below:
$ lsof -i
If you lot desire to larn to a greater extent than nearly lsof command, a "Swiss Army Knife for programmers", you lot tin depository fiscal establishment gibe out my before post, 10 ways to exercise the lsof ascendency inward Linux.
11) Can you lot mention 10 Linux commands you lot exercise daily? (answer)
This is easy, right? you lot tin mention whatever Linux commands you lot exercise but brand certain you lot give a multifariousness of commands e.g. commands to search, networking commands, physical care for management commands, CPU in addition to retention profiling commands etc.
Anyway, hither is my listing of closed to basic Linux commands
If you lot dearest books in addition to desire to larn to a greater extent than nearly basic UNIX commands in addition to then please see The Linux Command Line: H5N1 Complete Introduction, a consummate take to Linux commands.
If you lot prefer online courses in addition to then depository fiscal establishment gibe out the 2 courses I have got to propose you lot before, I by in addition to large start amongst a course of study in addition to and then read a majority for to a greater extent than in-depth understanding.
1) How produce you lot discovery the minute highest salary inward the employee table? (answer)
There are many ways to discovery the minute highest salary inward the employee tabular array e.g. you lot tin either exercise the co-related subquery, or you lot tin exercise a ranking component like row_number() and rank().
The query tin hold out fifty-fifty to a greater extent than tricky yesteryear adding duplicates e.g. 2 employees amongst the same salary. In that case, you lot tin pick out betwixt ranking component to satisfy the requirement.
I have got already written a detailed weblog postal service nearly this topic, delight see here for a dyad of illustration of finding the minute highest salary inward the employee table.
2) How produce you lot discovery the duplicate rows inward a table? (answer)
Again, similar the previous question, in that place are several ways to discovery the duplicate rows inward tabular array e.g. you lot tin exercise a ranking component similar row_number which assign row position out depending upon the value you lot enquire in addition to for same values similar inward the instance of duplicate rows, the row position out volition hold out same.
You tin equally good the group by clause to discovery duplicates e.g.
This i of the classic means to discovery the duplicate rows inward a tabular array in addition to it volition piece of work inward almost all database similar Oracle, SQL Server, or MySQL.
14) How produce you lot take the duplicate rows from the table? (answer)
This is the follow-up previous query in addition to much tougher than the previous one, peculiarly if you lot are non familiar amongst the ranking functions similar row_number.
If you lot solely know nearly GROUP BY clause in addition to then you lot volition combat to take duplicate rows because if you lot take yesteryear emp_id both rows volition hold out removed. Here you lot must exercise the row_number() function, the duplicate rows volition have row position out > 1 like
This volition impress something similar below
John 1
Heroku 1
David 1
David 2
Here minute David is duplicate in addition to you lot tin easily take it yesteryear giving status similar delete from tabular array where row_number> 1.
Though, if you lot are non familiar amongst window functions similar rank in addition to row_number() I propose you lot transcend through an online course of study like Microsoft SQL for Beginners. This volition non solely assist you lot to empathize basic SQL commands but equally good render closed to insight on how to exercise them effectively inward your twenty-four hours to twenty-four hours work.
3) What is the deviation betwixt clustered in addition to non-clustered index? (answer)
This is i of the often asked database questions, the primary deviation betwixt 2 is that in that place tin hold out solely i clustered index on a tabular array spell you lot tin have got to a greater extent than than i non-clustered index. The clustered index equally good defines how the information is physically stored on the disk.
4) How produce you lot discovery all records modified betwixt 2 dates inward SQL? (answer)
This is i of the tricky SQL questions. It looks uncomplicated but when you lot transcend in addition to write the SQL query, you lot volition discovery that it's non working equally expected. For example, many programmers volition exercise the "between" SQL clause to discovery all the rows modified betwixt 2 dates e.g.
This volition piece of work good inward most cases but if in that place is an fellowship where order_date is midnight of 1st Oct in addition to then it volition equally good hold out picked. You tin hold out to a greater extent than precise yesteryear using the logical operator equally shown below:
5) What is the deviation between count(field) and count(*) in SQL? (answer)
The solely deviation between count(field) and count(*) is that old doesn't count nix values spell afterwards does. For example, if you lot have got an emp_name column on your tabular array in addition to it contains 10 valid values in addition to iii nix values then count(emp_name) will render 10 spell count(*) volition render thirteen rows.
That's all nearly SQL in addition to UNIX questions for Programmers in addition to Software Engineers. As I said, these 2 technologies are really very of import for whatever task in addition to goodness ascendency on these 2 goes a long means to secure the job. They are equally good classic technologies i.e. they don't obsolete inward every dyad of yr in addition to they volition rest pop for several years to come.
I have got interviewed a lot of back upward guys, particular for Java applications in addition to I have got ever focused on their center Java, in addition to back upward skills along amongst SQL in addition to UNIX, in addition to fortunately the people who have got come upward out of those interviews have got done really good on their job.
Other Interview questions for Programmers
Along amongst these questions, you lot should equally good depository fiscal establishment gibe next interview questions shared before to produce good on your back upward task interviews.
Thanks for reading this article thence far. If you lot similar this tutorial in addition to then delight percentage amongst your friends in addition to colleagues. If you lot have got whatever question, uncertainty or seeking an reply for something, delight drib a comment in addition to I'll endeavour to discovery an reply for you.
Since the primary task of back upward professional person is to facial expression after production environment, which often runs on Linux, it's really of import for them to have got a goodness cognition of both Linux operating arrangement in addition to ascendency line.
They should know what they are doing because wrong exercise of grep or rm ascendency tin convey downward the whole production system. That's why they are extensively questioned in addition to tested inward their UNIX skill.
Same is truthful for SQL because most of the existent the world arrangement uses a relational database for backend similar Oracle, MySQL or Microsoft SQL Server in addition to back upward professionals often demand to run queries, study stored physical care for or write procedures to generate reports.
Just similar UNIX command, a careless SQL query equally good has potential to convey downward your production arrangement to halt in addition to you lot should ever produce due diligence before running whatever query against alive surround similar testing them inward UAT or QA surround before running them inward Production.
This unmarried thing has saved my life a dyad of times in addition to I have got jolted a dyad of points you lot should have got tending spell running queries on production or alive database, you lot tin discovery those tips here.
Because of these reasons, SQL in addition to UNIX transcend essential skills for whatever software back upward professional. If you lot intend you lot lack SQL in addition to Linux skills in addition to then I propose you lot to showtime transcend through a comprehensive course of study like The Complete SQL Bootcamp and Linux Command Line Basics before appearing whatever interviews. These courses are groovy to fill upward whatever gaps you lot have got inward your understanding.
Linux Interview Questions for Programmers
This listing contains closed to of the questions which I intend really of import from a Java back upward perspective, in addition to many of them are genuinely asked inward existent interviews. If you lot are going for whatever Java back upward role, you lot tin await closed to SQL in addition to Linux questions along amongst Core Java questions.I encourage you lot to transcend through this listing to acquire an thought of what to await inward existent Java back upward interview.
Btw, this is the minute component of my listing of interview questions for Java information technology back upward professional. In the first part, I have got shared thirty essential Java in addition to JEE questions in addition to inward this part, I'll percentage 17 SQL in addition to UNIX questions from diverse Java Support Interviews.
Anyway, hither are closed to of the often asked SQL in addition to UNIX questions from Programming Job interviews:
1) What volition hand when a TCP/IP customer stops consuming messages from Server but it's connected? Assume Server is continuously sending messages. (answer)
The message volition hold out stored on sending buffer at the sender halt because it volition halt receiving the ack from the receiver. If the server hold continues to force messages, the sending buffer volition overflow, throw an mistake to halt the server.
2) What guarantees are provided yesteryear TCP/IP? (answer)
The TCP/IP provides the guaranteed delivery but apart that it equally good provides ordering guarantee i.e. message volition hold out delivered to the customer inward the same fellowship they are sent from the sender.
This is i of the of import argue to consider TCP/IP for ordered messages e.g. orders in addition to trades inward the fiscal world.
Btw, if you lot desire to larn to a greater extent than nearly TCP protocol you lot tin encounter this here to discovery closed to goodness majority to larn to a greater extent than nearly TCP/IP protocol from application developer's perspective.
3) How produce you lot discovery the PID of a physical care for listening on port 8080? (answer)
If the physical care for is running on a Linux operating arrangement in addition to then it's pretty easy, only exercise the netstat ascendency to discovery the PID of the process, netstat -p shows the PID. Once you lot got the physical care for id, you lot tin exercise the ps ascendency to discovery the physical care for itself.
Btw, If you lot are non familiar amongst netstat, ps or telephone substitution Linux commands in addition to then I propose you lot to showtime transcend through answer)
This is i of the mutual province of affairs Java programmer face. In Linux, you lot tin exercise the discovery ascendency to search all large files. The discovery -size options listing the file amongst their sizes.
8) How produce you lot discovery the heap dump files inward Linux? (answer)
The heap dump files are by in addition to large inward the shape of java_pid.hprof, thence you lot tin easily search them using discovery ascendency inward Linux equally shown below:
$ discovery . -name *.hprof -print
9) How produce you lot discovery the files currently used yesteryear your Java process? (answer)
You tin exercise the lsof command to discovery all the files, including sockets yesteryear your Java physical care for inward Linux. The lsof command stands for listing opened upward files in addition to since everything inward UNIX is file it tin listing both normal files equally good equally opened upward socket connector yesteryear whatever process.
$ lsof -c java
volition listing all files opened yesteryear coffee command, and,
$ lsof -p 22342
volition listing all files opened yesteryear physical care for id 22342.
For a more in-depth discussion on using lsof command and its diverse open, I propose you lot transcend through the Linux Command Line Basics course on Udemy. It covers all basic Linux commands amongst real-world examples.
10) How produce you lot discovery the ports currently used yesteryear a Java process? (answer)
You tin exercise the netstat or lsof ascendency to discovery all the ports currently used yesteryear a Java process, but for that, you lot demand the physical care for id of your Java process. You tin discovery the PID using ps in addition to grep ascendency equally shown below:
$ ps -ef | grep coffee | grep myprocess
Once you lot discovery the PID of your Java process, you lot tin exercise the netstat command to discovery the ports currently used this Java physical care for equally shown inward the next example:
$ netstat -nap | grep PID
If netstat is non available on your Linux machine you lot tin equally good exercise the lsof ascendency to discovery all the ports used yesteryear a Java physical care for equally shown below:
$ lsof -i
If you lot desire to larn to a greater extent than nearly lsof command, a "Swiss Army Knife for programmers", you lot tin depository fiscal establishment gibe out my before post, 10 ways to exercise the lsof ascendency inward Linux.
11) Can you lot mention 10 Linux commands you lot exercise daily? (answer)
This is easy, right? you lot tin mention whatever Linux commands you lot exercise but brand certain you lot give a multifariousness of commands e.g. commands to search, networking commands, physical care for management commands, CPU in addition to retention profiling commands etc.
Anyway, hither is my listing of closed to basic Linux commands
- ls
- top
- ps
- find
- grep
- netstat
- df
- lsof
- kill
- sort
- chmod
- du
- pwd
If you lot dearest books in addition to desire to larn to a greater extent than nearly basic UNIX commands in addition to then please see The Linux Command Line: H5N1 Complete Introduction, a consummate take to Linux commands.
If you lot prefer online courses in addition to then depository fiscal establishment gibe out the 2 courses I have got to propose you lot before, I by in addition to large start amongst a course of study in addition to and then read a majority for to a greater extent than in-depth understanding.
SQL Interview Questions for Programmers
Now that you lot have got seen closed to of the often asked Linux/UNIX ascendency draw questions from programming task interviews, let's verbalize over closed to SQL in addition to Database interview questions. This listing includes questions on SQL query in addition to database fundamentals.1) How produce you lot discovery the minute highest salary inward the employee table? (answer)
There are many ways to discovery the minute highest salary inward the employee tabular array e.g. you lot tin either exercise the co-related subquery, or you lot tin exercise a ranking component like row_number() and rank().
The query tin hold out fifty-fifty to a greater extent than tricky yesteryear adding duplicates e.g. 2 employees amongst the same salary. In that case, you lot tin pick out betwixt ranking component to satisfy the requirement.
I have got already written a detailed weblog postal service nearly this topic, delight see here for a dyad of illustration of finding the minute highest salary inward the employee table.
2) How produce you lot discovery the duplicate rows inward a table? (answer)
Again, similar the previous question, in that place are several ways to discovery the duplicate rows inward tabular array e.g. you lot tin exercise a ranking component similar row_number which assign row position out depending upon the value you lot enquire in addition to for same values similar inward the instance of duplicate rows, the row position out volition hold out same.
You tin equally good the group by clause to discovery duplicates e.g.
select emp_name, count(*) from employee group by emp_name having count(*) > 1
This i of the classic means to discovery the duplicate rows inward a tabular array in addition to it volition piece of work inward almost all database similar Oracle, SQL Server, or MySQL.
14) How produce you lot take the duplicate rows from the table? (answer)
This is the follow-up previous query in addition to much tougher than the previous one, peculiarly if you lot are non familiar amongst the ranking functions similar row_number.
If you lot solely know nearly GROUP BY clause in addition to then you lot volition combat to take duplicate rows because if you lot take yesteryear emp_id both rows volition hold out removed. Here you lot must exercise the row_number() function, the duplicate rows volition have row position out > 1 like
select emp_name, row_number() over (order by emp_name desc) row_number from Employee
This volition impress something similar below
John 1
Heroku 1
David 1
David 2
Here minute David is duplicate in addition to you lot tin easily take it yesteryear giving status similar delete from tabular array where row_number> 1.
Though, if you lot are non familiar amongst window functions similar rank in addition to row_number() I propose you lot transcend through an online course of study like Microsoft SQL for Beginners. This volition non solely assist you lot to empathize basic SQL commands but equally good render closed to insight on how to exercise them effectively inward your twenty-four hours to twenty-four hours work.
3) What is the deviation betwixt clustered in addition to non-clustered index? (answer)
This is i of the often asked database questions, the primary deviation betwixt 2 is that in that place tin hold out solely i clustered index on a tabular array spell you lot tin have got to a greater extent than than i non-clustered index. The clustered index equally good defines how the information is physically stored on the disk.
4) How produce you lot discovery all records modified betwixt 2 dates inward SQL? (answer)
This is i of the tricky SQL questions. It looks uncomplicated but when you lot transcend in addition to write the SQL query, you lot volition discovery that it's non working equally expected. For example, many programmers volition exercise the "between" SQL clause to discovery all the rows modified betwixt 2 dates e.g.
select * from Orders where order_date between '20160901' and '20160930'
This volition piece of work good inward most cases but if in that place is an fellowship where order_date is midnight of 1st Oct in addition to then it volition equally good hold out picked. You tin hold out to a greater extent than precise yesteryear using the logical operator equally shown below:
select * from Orders where order_date >='20160901' and order_date < '20160930'
5) What is the deviation between count(field) and count(*) in SQL? (answer)
The solely deviation between count(field) and count(*) is that old doesn't count nix values spell afterwards does. For example, if you lot have got an emp_name column on your tabular array in addition to it contains 10 valid values in addition to iii nix values then count(emp_name) will render 10 spell count(*) volition render thirteen rows.
That's all nearly SQL in addition to UNIX questions for Programmers in addition to Software Engineers. As I said, these 2 technologies are really very of import for whatever task in addition to goodness ascendency on these 2 goes a long means to secure the job. They are equally good classic technologies i.e. they don't obsolete inward every dyad of yr in addition to they volition rest pop for several years to come.
I have got interviewed a lot of back upward guys, particular for Java applications in addition to I have got ever focused on their center Java, in addition to back upward skills along amongst SQL in addition to UNIX, in addition to fortunately the people who have got come upward out of those interviews have got done really good on their job.
Other Interview questions for Programmers
Along amongst these questions, you lot should equally good depository fiscal establishment gibe next interview questions shared before to produce good on your back upward task interviews.
- 10 Frequently asked SQL queries from Interviews
- 21 Frequently asked Java Interview Questions
- Top 50 Multithreading Interview Questions
- Top thirty Array-based Interview Questions
- Top 20 LinkedList based Interview Questions
- Top 50 Java Programs from Coding Interviews
- Difference betwixt Primary in addition to Unique key inward SQL
- Top 50 Programming questions for a telephonic interview
- 50+ Data Structure in addition to Algorithms Interview questions
Thanks for reading this article thence far. If you lot similar this tutorial in addition to then delight percentage amongst your friends in addition to colleagues. If you lot have got whatever question, uncertainty or seeking an reply for something, delight drib a comment in addition to I'll endeavour to discovery an reply for you.
0 Response to "Top X Sql In Addition To Unix Interview Questions For Programmers"
Post a Comment