Skip to content

Tag: sql-server

Finding employees who are not managers

I have a table where we have staff_id and manager_id. Attached screenshot. I found managers by using this query: select e.first_name as employee , m.first_name as manager from sales.staffs E inner …

Pivot Table with Dynamic

My quest might be answered in somewhere here but I couldn’t find. So, sorry if I asked in vain. I have a Table that’s populate automatically with precisely date/time in SQL Server and looks like …