instruction
stringclasses
1 value
input
stringlengths
29
86
output
stringlengths
46
531
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Show me all active tasks assigned to Aaron Aco
SELECT task_name, task_description, story_point_est FROM main_tasks INNER JOIN task_assignees ON main_tasks.id = task_assignees.main_task_id INNER JOIN users ON task_assignees.assignee_user_id = users.id WHERE first_name = 'Aaron' AND last_name = 'Aco' AND is_archived = FALSE GROUP BY main_tasks.id ORDER BY main_tasks.created_at DESC;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
What's the total hours Japho Palit-ang spent on tasks between July 1-15, 2024?
SELECT SUM(dtr_task_time_spents.hours_spent) AS total_hours FROM dtr_task_time_spents INNER JOIN users ON dtr_task_time_spents.user_id = users.id WHERE users.first_name = 'Japho' AND users.last_name = 'Palit-ang' AND dtr_task_time_spents.work_date BETWEEN '2024-07-01' AND '2024-07-15';
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
List all projects that Jerick Arlantico is currently working on as of August 15, 2024
SELECT title FROM projects INNER JOIN user_projects ON projects.id = user_projects.project_id INNER JOIN users ON user_projects.user_id = users.id WHERE users.first_name = 'Jerick' AND users.last_name = 'Arlantico' AND projects.is_active = TRUE AND user_projects.is_active = TRUE AND user_projects.created_at <= '2024-08-15';
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
What tasks did Jaybee Balog finish in the first week of June 2024?
SELECT main_tasks.id, main_tasks.task_name, task_progresses.progress_percent, task_progresses.created_at FROM main_tasks INNER JOIN task_progresses ON main_tasks.id = task_progresses.main_task_id INNER JOIN task_assignees ON main_tasks.id = task_assignees.main_task_id INNER JOIN users ON task_assignees.assignee_user_id = users.id WHERE users.first_name = 'Jaybee' AND users.last_name = 'Balog' AND task_progresses.progress_percent = 100 AND task_progresses.created_at BETWEEN '2024-06-01' AND '2024-06-07' GROUP BY main_tasks.id;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Which tasks took the most time in the week of September 9-13, 2024? Show me the top 5
SELECT main_tasks.task_name, projects.title AS project_name, SUM(dtr_task_time_spents.hours_spent) AS total_hours FROM main_tasks INNER JOIN dtr_task_time_spents ON main_tasks.id = dtr_task_time_spents.main_task_id INNER JOIN projects ON main_tasks.project_id = projects.id WHERE dtr_task_time_spents.work_date BETWEEN '2024-09-09' AND '2024-09-13' GROUP BY main_tasks.task_name , projects.title ORDER BY total_hours DESC LIMIT 5;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
How many hours has Aaron Aco worked on each project in May 2024?
SELECT projects.title AS project_name, SUM(dtr_task_time_spents.hours_spent) AS total_hours FROM dtr_task_time_spents INNER JOIN projects ON dtr_task_time_spents.project_id = projects.id INNER JOIN users ON dtr_task_time_spents.user_id = users.id WHERE users.first_name = 'Aaron' AND users.last_name = 'Aco' AND dtr_task_time_spents.work_date BETWEEN '2024-05-01' AND '2024-05-31' GROUP BY projects.id ORDER BY total_hours DESC;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
List all attachments uploaded by Japho Palit-ang between March 15 to June 15, 2024
SELECT main_tasks.task_name, attachments.url FROM attachments INNER JOIN users ON attachments.user_id = users.id INNER JOIN main_tasks ON attachments.project_id = main_tasks.project_id WHERE users.first_name = 'Japho' AND users.last_name = 'Palit-ang' AND attachments.created_at BETWEEN '2024-03-15' AND '2024-06-15' ORDER BY attachments.created_at DESC;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
What's the total hours spent by each team member on their assigned tasks in July 2024?
SELECT users.first_name, users.last_name, SUM(dtr_task_time_spents.hours_spent) AS total_hours FROM dtr_task_time_spents dts INNER JOIN users u ON dtr_task_time_spents.user_id = users.id WHERE dtr_task_time_spents.work_date BETWEEN '2024-07-01' AND '2024-07-31' GROUP BY users.id ORDER BY total_hours DESC;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Show me all users who were late in June 2024, with their late count
SELECT users.first_name, users.last_name, COUNT(activities.id) AS times_late FROM activities INNER JOIN users ON activities.user_id = users.id WHERE activities.is_late = TRUE AND activities.started_at >= '2024-06-01' AND activities.started_at < '2024-07-01' GROUP BY users.id ORDER BY times_late DESC;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Show bookmark activity between July and September 2024
SELECT DATE(created_at) as bookmark_date, COUNT(*) as total_bookmarks, COUNT(DISTINCT company_id) as companies_with_bookmarks, COUNT(DISTINCT user_id) as users_with_bookmarks FROM task_bookmarks WHERE created_at BETWEEN '2024-07-01' AND '2024-09-19' GROUP BY DATE(created_at) ORDER BY bookmark_date;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Show me all active projects and their task counts as of September 1, 2024
SELECT projects.title AS project_name, COUNT(DISTINCT main_tasks.id) AS main_tasks_count, COUNT(DISTINCT sub_tasks.id) AS subtasks_count FROM projects LEFT JOIN main_tasks ON projects.id = main_tasks.project_id AND main_tasks.is_archived = FALSE LEFT JOIN sub_tasks ON main_tasks.id = sub_tasks.main_task_id AND sub_tasks.is_archived = FALSE WHERE projects.is_active = TRUE AND projects.created_at <= '2024-09-01' GROUP BY projects.id ORDER BY projects.title;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
How many users are still active ?
SELECT count(*) FROM users WHERE is_active = 1
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
How many times was Paul Samuel Lacap late in August 2024?
SELECT users.*, activities.* FROM users INNER JOIN activities ON users.id = activities.user_id WHERE CONCAT(first_name, ' ', last_name) = 'Paul Samuel Lacap' AND activities.is_late = 1 AND NOT DAYOFWEEK(activities.started_at) IN (1,7) AND MONTH(activities.started_at) = 8 and YEAR(activities.started_at) = 2024
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
How many employees did extra miles in the month of May?
SELECT COUNT(*) AS extra_mile_users FROM( SELECT user_id, AVG(total_hours_spent) AS average_time_spent FROM daily_time_reports WHERE MONTH(work_date) = 5 AND YEAR(work_date) = 2024 GROUP BY user_id HAVING average_time_spent > 8.15 ) AS extra_mile_table
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
How many hours did Paul Lacap spent yesterday?
SELECT total_hours_spent FROM daily_time_reports INNER JOIN users ON daily_time_reports.user_id = users.id WHERE CONCAT(first_name, ' ', last_name) = 'Paul Samuel Lacap' AND work_date = work_date = CURDATE() - INTERVAL 1 DAY;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
What is the total amount of time JP Ruelo spent on PTO (Personal Time Off) last year?
SELECT SUM(time_spent)/3600 AS break_time_hours FROM activities INNER JOIN users ON activities.user_id = users.id WHERE YEAR(started_at) = YEAR(CURDATE()) AND CONCAT(first_name, ' ', last_name) = 'John Paulo Ruelo';
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
How many times did employees went to the hospital?
SELECT COUNT(*) AS hospital_count FROM activities WHERE notes LIKE '%hospital%';
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
How long did each employee spend time on lunch break this year?
SELECT user_id, users.first_name, users.last_name, SUM(time_spent)/3600 AS hours_spent FROM activities INNER JOIN users ON activities.user_id = users.id WHERE notes LIKE '%lunch%' AND YEAR(started_at) = YEAR(CURDATE()) GROUP BY user_id;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Have Paul sent his daily time report today?
SELECT is_sent FROM daily_time_reports INNER JOIN users ON daily_time_reports.user_id = users.id WHERE (first_name LIKE '%Paul%' OR last_name LIKE '%Paul%') AND is_sent = 1 AND sent_date = curdate();
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Who are on break at the moment?
SELECT activities.user_id, users.first_name, users.last_name, activities.started_at, activities.expected_end_at, activities.ended_at FROM activities INNER JOIN users ON activities.user_id = users.id WHERE ended_at IS NULL AND started_at = CURDATE();
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
List all the names of the employees who did not work on July 7, 2024
SELECT users.id, users.first_name, users.last_name, daily_time_reports.is_sent FROM users LEFT JOIN daily_time_reports ON users.id = daily_time_reports.user_id AND daily_time_reports.sent_date = '2024-07-07' AND daily_time_reports.is_sent = NULL
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Show all users whose leaves are approved between February and April 2024
SELECT first_name, last_name leave_date, reasons FROM leaves INNER JOIN users ON users.id = leaves.user_id WHERE leaves.leave_date BETWEEN '2024-02-01' AND '2024-04-30' AND leaves.is_approved = TRUE ORDER BY leaves.leave_date;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Show cancelled leave requests in September 2024
SELECT first_name, last_name, leave_date, reasons FROM leaves INNER JOIN users ON users.id = leaves.user_id WHERE leaves.leave_date BETWEEN '2024-09-01' AND '2024-09-19' AND leaves.is_cancelled = TRUE ORDER BY leaves.leave_date;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
List all pending leave requests for August 2024
SELECT leave_approvals.awarded_by_user_id, leave_approvals.created_at AS approval_created_at FROM leaves INNER JOIN leave_approvals ON leaves.id = leave_approvals.leave_id WHERE leaves.is_approved = 0 AND leaves.is_cancelled = 0 AND leaves.leave_date BETWEEN '2024-07-01' AND '2024-08-31';
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Which employees have used the most leave credits in the past month?
SELECT first_name, last_name, SUM(leaves.credit_consumed) AS total_credits_used FROM leaves INNER JOIN users ON users.id = leaves.user_id WHERE leaves.is_approved = 1 AND leaves.leave_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY leaves.user_id ORDER BY total_credits_used DESC LIMIT 1;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
How many leaves have been approved and how many are still pending?
SELECT COUNT(CASE WHEN leaves.is_approved = 1 THEN 1 END) AS approved_leaves, COUNT(CASE WHEN leaves.is_approved = 0 THEN 1 END) AS pending_leaves FROM leaves;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Are there employees who have never taken leave?
SELECT first_name, last_name FROM users LEFT JOIN leaves ON leaves.user_id = users.id WHERE leaves.user_id IS NULL;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Are there specific months or seasons where leave requests peak?
SELECT DATE_FORMAT(leave_date, '%M') AS month_name, COUNT(id) AS total_leaves FROM leaves WHERE is_cancelled = 0 GROUP BY MONTH(leave_date) ORDER BY total_leaves DESC LIMIT 3;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
Who has the most sick leaves?
SELECT CONCAT(users.first_name, ' ', users.last_name) AS full_name, COUNT(leaves.id) AS sick_leave_count FROM users INNER JOIN leaves ON users.id = leaves.user_id INNER JOIN leave_types ON leaves.leave_type_id = leave_types.id WHERE leave_types.id = 2 AND leaves.is_cancelled = 0 GROUP BY users.id ORDER BY sick_leave_count DESC LIMIT 1;
I want you to act as a SQL writer that convert questions from user to a SQL queries, you need only to return the sql command to me. Below is an instruction that describes a task, Write a response that appropriately completes the request.
What is the most common reason employees provide for taking leave?
SELECT reasons, COUNT(id) AS frequency FROM leaves WHERE is_cancelled = 0 GROUP BY reasons ORDER BY frequency DESC LIMIT 3;

Dataset Card for Dataset Name

This dataset card aims to be a base template for new datasets. It has been generated using this raw template.

Dataset Details

Dataset Description

  • Curated by: [More Information Needed]
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Language(s) (NLP): [More Information Needed]
  • License: [More Information Needed]

Dataset Sources [optional]

  • Repository: [More Information Needed]
  • Paper [optional]: [More Information Needed]
  • Demo [optional]: [More Information Needed]

Uses

Direct Use

[More Information Needed]

Out-of-Scope Use

[More Information Needed]

Dataset Structure

[More Information Needed]

Dataset Creation

Curation Rationale

[More Information Needed]

Source Data

Data Collection and Processing

[More Information Needed]

Who are the source data producers?

[More Information Needed]

Annotations [optional]

Annotation process

[More Information Needed]

Who are the annotators?

[More Information Needed]

Personal and Sensitive Information

[More Information Needed]

Bias, Risks, and Limitations

[More Information Needed]

Recommendations

Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations.

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Dataset Card Authors [optional]

[More Information Needed]

Dataset Card Contact

[More Information Needed]

Downloads last month
82