INTERVIEW QUESTION | DAX | SQL | Employee Details

 DROP TABLE IF EXISTS Employee;


CREATE TABLE Employee (

    EmpID INT PRIMARY KEY,

    Name VARCHAR(100),

    Department VARCHAR(50),

    Salary DECIMAL(10, 2),

    HireDate DATE,

    YearsInCompany INT

);


INSERT INTO Employee (EmpID, Name, Department, Salary, HireDate, YearsInCompany)

VALUES

(1, 'Alice', 'IT', 70000, '2015-05-10', 9),

(2, 'Bob', 'HR', 50000, '2020-02-15', 4),

(3, 'Charlie', 'IT', 65000, '2017-07-22', 7),

(4, 'David', 'Sales', 55000, '2019-09-30', 5),

(5, 'Eva', 'HR', 72000, '2016-03-12', 8),

(6, 'Frank', 'Finance', 80000, '2014-01-05', 10),

(7, 'Grace', 'IT', 67000, '2018-11-19', 6),

(8, 'Henry', 'Sales', 59000, '2021-05-08', 3),

(9, 'Irene', 'HR', 75000, '2016-12-10', 8),

(10, 'Jack', 'IT', 78000, '2013-06-25', 11),

(11, 'Kate', 'Sales', 62000, '2017-03-30', 7),

(12, 'Leo', 'Finance', 73000, '2015-09-11', 9),

(13, 'Mike', 'IT', 71000, '2020-12-01', 4),

(14, 'Nora', 'HR', 64000, '2018-07-21', 6),

(15, 'Owen', 'Sales', 67000, '2019-02-18', 5),

(16, 'Paula', 'Finance', 76000, '2016-10-22', 8),

(17, 'Quinn', 'IT', 80000, '2022-03-15', 2),

(18, 'Ryan', 'Sales', 61000, '2021-11-09', 3),

(19, 'Sarah', 'HR', 69000, '2014-12-19', 10),

(20, 'Tom', 'IT', 85000, '2013-08-17', 11);

Comments

Popular posts from this blog

50 Essential SQL Questions to Land Your Dream Job

How to find all the customers who placed orders on three consecutive days | SQL Scenario questions

ACCENTURE SQL INTERVIEW QUESTION | Change the ProductIDs