Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular

SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code. You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.

Copy Format Clear
CREATE TABLE Employee ( employee_id INT , employee_name VARCHAR(50), department_id INT, lposition VARCHAR(50), salary DECIMAL(10, 2) ); INSERT INTO Employee (employee_id, employee_name, department_id, lposition, salary) VALUES (1, 'Alice Johnson', 101, 'Software Engineer', 70000), (2, 'Bob Smith', 102, 'Data Scientist', 80000), (3, 'Carol White', 103, 'Project Manager', 75000), (4, 'David Brown', 104, 'Quality Assurance', 60000), (5, 'Eva Green', 105, 'HR Specialist', 55000), (6, 'Frank Martin', 101, 'Software Engineer', 70000), (3, 'Carol White', 103, 'Project Manager', 75000), (4, 'David Brown', 104, 'Quality Assurance', 60000); select * from Employee -- query 3. write a query to find out highest earning employee based on each position select lposition,count(employee_name)as employee, count(salary)as salary from Employee group by lposition,employee_name;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear