Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Anirudh Reddy P.
Software Engineer at Cloudchip Technologies
Tutor Satisfaction Guarantee
SQL Programming
TutorMe
Question:

What is a correlated subquery?

Anirudh Reddy P.
Answer:

A correlated subquery is a subquery that contains a reference to a table (in the parent query) that also appears in the outer query. MySQL evaluates from inside to outside. Example: From the employees and job_history tables, you need to display details of those employees who have changed jobs at least once. The query would be like: SELECT first_name, last_name, employee_id, job_id FROM employees E WHERE 1 <= (SELECT COUNT(*) FROM Job_history WHERE employee_id = E.employee_id); Since there is a reference to the parent table in the outer query, it is a correlated subquery.

PHP Programming
TutorMe
Question:

What's the difference between mysqli_fetch_row, mysqli_fetch_object, mysqli_fetch_assoc, mysqli_fetch_array?

Anirudh Reddy P.
Answer:

All of them retrieve the data from the query result but they differ in the way they store query data. The mysqli_fetch_row() function fetches one row from a result-set and returns it as an enumerated array. The mysqli_fetch_array() is just an extended version of the mysqli_fetch_row() function. In addition to storing the data in the numeric indices of the result array, the mysqli_fetch_array() function can also store the data in associative indices, using the field names of the result set as keys. The mysqli_fetch_assoc() function fetches a result row as an associative array. The mysqli_fetch_object() function returns the current row of a result set, as an object.

Geometry
TutorMe
Question:

Suppose, a circle of maximum possible size is cut from a square sheet of side 'a' units. Then, a square of maximum possible size is cut from the resultant circle. What will be an area of the final square?

Anirudh Reddy P.
Answer:

The side of the original square is 'a' units. Therefore, the area of the original square = a^2 units. The diameter of the circle that is cut from the original square will be 'a' units. Therefore, the diagonal of the square of maximum possible dimension that can be cut from the circle will be 'a' units. Since the diagonal of the final square is 'a' units, then its area = (a^2)/2 units, and the area of the new square will be 50% or half of the area of the original square.

Send a message explaining your
needs and Anirudh Reddy will reply soon.
Contact Anirudh Reddy
Ready now? Request a lesson.
Start Session
FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Session" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.