When working with reports and analytics, one common problem keeps showing up: missing days. Your database only stores rows when something happens. It can be sales, logins, tickets, events. But charts ...
I have a table that's something like this:<BR><BR><pre class="ip-ubbcode-code-pre">CREATE TABLE thread(id INT, parentid INT, sometext TEXT);</pre><BR><BR>The values ...
Recursive:- Imagine you have a family tree, and each person in the family is like a row in a MySQL table. Now, you want to find out who the ancestors of a particular person are. The conversation ...
Problem: Starting from the HR department head (dept_id = 1, manager_id is NULL), list all employees in that reporting chain (head + all direct/indirect reports).