InterviewLegend

The SQL & Front-End Tasks

Alex Chen30 min readGuide updated
In this lesson
  • Write an anti-join that survives NULLs to find customers with no orders
  • Count rows per group over a computed date range with GROUP BY and HAVING
  • Read an unfamiliar schema and pick the right join before you type
  • Fix broken DOM code fast: selectors, event listeners, form values and timing

Until mid-2025, the Accenture campus coding round was two algorithm questions in 45 minutes. From the 2025-26 season on, most papers have three tasks instead. There's one DSA problem, one SQL query against a schema you're handed, and one front-end task in HTML, CSS and JavaScript. One July 2026 drive at an NIT shortlisted only the candidates who solved all three.

Strong DSA candidates tend to lose the round on that requirement. They've spent months on arrays and graphs, then meet a LEFT JOIN or a click handler they haven't written since second year. Two SQL asks are worked below as runnable problems. The web task changes from drive to drive, so that part covers its shape and the DOM code to have ready.

The Accenture angle
Solve all three, even if the DSA one is shaky. One July 2026 drive kept only the 3/3 solvers. A September 2026 candidate called the SQL and web tasks easy, though the July candidate found the web task hard. For most people they're cheaper marks than the DSA problem, so bank them.

Where SQL and front end sit on the paper

The coding round comes in the same sitting as the MCQs, often straight after them. September and October 2026 candidates say the DSA problem runs in Python, Java or C#. A July 2026 account mentions only Java and Python, and a June 2026 one said any language worked. SQL is a plain query, and the web task is HTML, CSS and JavaScript. If C++ is your language, get comfortable writing the DSA problem in Python or Java well before the test.

WhenWhat candidates saw
October 2026One array or pointer DSA problem, one SQL query on a provided schema, and an "implementation-based" HTML, CSS and JavaScript question.
September 2026, 22.15 LPA driveSQL, DSA, and a front-end task described as "JavaScript/DOM correction". The candidate solved all three.
September 2026Easy array questions, easy SQL, and easy HTML, CSS and JS. For the front end, some code was given and you added to it.
July 2026, NIT driveSQL rated medium and the web question called challenging. Only 3/3 solvers were shortlisted.
July 2026, internA heavier mix: two DSA questions, two SQL queries and a front-end CSS question, among others.
October 2025A front-end task, a SQL query built on joins that needed you to understand the schema, and a dynamic sliding window problem.

The mix shifts a little between drives, and one October 2026 drive ran two DSA questions with no SQL mentioned at all. The common case is still one of each. Plan for the three-task paper and treat any variation as a bonus.

The SQL task

You get a schema you've never seen, a few tables with their columns, and a question in plain English. An October 2025 account stresses the schema itself: the query was "based on joins" and "required understanding of the given database schema". So the first two minutes go to reading. Find the key that links each pair of tables, and decide whether rows without a match should survive.

Nobody has said which SQL engine the paper runs. Write portable SQL: JOIN, LEFT JOIN, GROUP BY, HAVING and ORDER BY behave the same in MySQL, PostgreSQL and SQLite. Date functions are the one place they differ, and the second problem below shows the three spellings side by side.

sql
-- 1. inner join: only rows with a match on both sides
SELECT o.id, c.name FROM orders o JOIN customers c ON c.id = o.customer_id;
-- 2. anti-join: rows on the left with NO match on the right
SELECT c.name FROM customers c
LEFT JOIN orders o ON o.customer_id = c.id
WHERE o.id IS NULL;
-- 3. group filter: WHERE filters rows, HAVING filters groups
SELECT customer_id, COUNT(*) FROM orders GROUP BY customer_id HAVING COUNT(*) > 3;
-- 4. half-open date range: on or after the start, strictly before the end
WHERE order_date >= '2026-10-01' AND order_date < '2026-11-01'

Settle two things before you write any SQL. First, whether a row with no match on the other table belongs in the answer. If it does, you need a LEFT JOIN. Second, whether each condition is about one row or a whole group. One row goes in WHERE, and a group goes in HAVING. A wrong answer usually misses one of those two.

Both problems below run in Python with SQLite, which is also how the second one was asked. The starter builds the tables from the input rows, so you only write the query. In the other languages you build the same answer with a map or a set, which is a decent check that you understand what the query does.

Asked at Accenture

Customers who never placed an order

A September 2026 intern online assessment asked for something like the customers who have never placed an order, over a customers table and an orders table. The version below uses the smallest schema that fits the ask. Treat it as a sample of the style.

1

Customers Who Never Ordered

EasySometimes asked
Problem
You're given two tables as lists of rows. customers holds [id, name]. orders holds [id, customer_id], and customer_id can be null for a guest checkout that belongs to no customer.

Return the names of every customer who has never placed an order, ordered by customer id. Two customers can share a name, and each one counts on its own.

Write it as one SQL query. The Python starter loads both tables into an in-memory SQLite database for you. In the other languages, build the same answer from a set of the customer ids that ordered.
Inputcustomers = [[1,"Asha"],[2,"Ravi"],[3,"Meera"],[4,"Kabir"]]orders = [[1,3],[2,1]]Output["Ravi","Kabir"]

Asha and Meera each have an order. Ravi and Kabir have none, and they come back in id order.

How this uses the pattern

Start from customers and LEFT JOIN orders on the customer id. A customer with no orders still gets one row, with NULL in every orders column, so keep the rows where o.id IS NULL.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Customers Who Never Ordered

Loading...
Click "Run" to execute your code
The Accenture angle
The task tests whether you reach for an anti-join. The common first draft is WHERE id NOT IN (SELECT customer_id FROM orders), and it works until a single order has a NULL customer id. Then every NOT IN comparison comes out unknown, and the query returns no rows with no error. A LEFT JOIN with WHERE o.id IS NULL, or NOT EXISTS, gives the right answer either way. The tests include a guest order to catch exactly that.
Take it further
Return every customer with their order count, zeros included. Keep the LEFT JOIN, group by the customer and count o.id. A customer with no orders still gets one NULL-filled row, and COUNT(*) counts it as 1. COUNT(o.id) skips NULLs and gives 0. Add HAVING COUNT(o.id) = 0 and you're back to the original question.

Employees with more than 3 leave requests last month (LLM Ops)

This one comes from an experienced hire's technical interview in November 2025, for an LLM Operations Engineer role. The ask was to write Python plus a SQLite query that finds the employees with more than 3 leave requests in the previous month. It comes from an LLM Ops round, outside the campus paper. It's here because it drills the other half of the SQL slot, GROUP BY with HAVING over a date range, and because Python plus SQLite is exactly how it was set.

2

Employees With More Than 3 Leave Requests Last Month

MediumSometimes asked
Problem
You're given two tables as lists of rows. employees holds [id, name]. leave_requests holds [id, employee_id, request_date], with each date a "YYYY-MM-DD" string. You also get today in the same format.

Find the employees with more than 3 leave requests in the previous calendar month, meaning the whole month before the one today falls in. Return [name, count] for each, ordered by count from highest to lowest, then by name from A to Z.

Write it in Python with one SQLite query. In the other languages, work out the previous month from today and count requests per employee id with a map.
Inputemployees = [[1,"Asha"],[2,"Ravi"]]leave_requests = [[1,1,"2026-10-02"],[2,1,"2026-10-09"],[3,1,"2026-10-17"],[4,1,"2026-10-28"],[5,2,"2026-10-05"],[6,2,"2026-10-06"],[7,2,"2026-10-20"]]today = "2026-11-15"Output[["Asha",4]]

The previous month is October 2026. Asha has 4 requests in it. Ravi has 3, and 3 is not more than 3.

How this uses the pattern

Filter rows to the previous month in WHERE with a half-open range: on or after the first of last month, and before the first of this month. Then GROUP BY the employee and keep the groups with HAVING COUNT(*) > 3.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Employees With More Than 3 Leave Requests Last Month

Loading...
Click "Run" to execute your code
The Accenture angle
Three details decide this one. You compute the month from today, so January must roll back to December of the year before. More than 3 is strict, and an employee with exactly 3 is out. Since the count is a group condition, it goes in HAVING. Group by the employee id as well as the name, because two people can share a name. The same November 2025 round also wanted a short Python script that fills a CSV's missing values with the median, so expect small, practical code like this.
Take it further
Now request_date carries a time of day after the date. The half-open range keeps working, because a timestamp from the evening of October 31 still sorts below 2026-11-01. BETWEEN '2026-10-01' AND '2026-10-31' silently drops every request on the 31st, because a date with a time after it sorts above the bare '2026-10-31'. In Python, keep passing today through a ? placeholder. An f-string works on test data, and it opens the query to SQL injection once the value comes from a user.

The front-end task

The web task varies the most. An October 2026 candidate called it an "implementation-based" HTML, CSS and JavaScript question. At the September 2026 drive paying 22.15 LPA it was a "JavaScript/DOM correction" task, where you fix code that doesn't work. Another September 2026 candidate said some code was given and you had to add things to it. A July 2026 NIT candidate found it challenging.

Put together, the shape is a small page that's partly built. You either finish a feature, such as wiring a button or validating a form, or you find what's broken in the JavaScript that drives it. The page changes from drive to drive, so don't hunt for "the Accenture front-end question". Practice reading someone else's DOM code quickly and writing the common pieces without looking anything up.

Plain JavaScript, no framework. Every 2025-26 candidate describes HTML, CSS and JavaScript or DOM work, and none mentions React. If your web work is all React, spend an evening writing querySelector, addEventListener and textContent by hand until they feel normal again.

The DOM code to know cold

Nearly any small page feature uses the same handful of calls. You find elements, listen for an event, read a value, and change the page. The snippet below uses all of them on a sign-up form. If you can write it from memory, you can finish most "add the missing behaviour" tasks.

javascript
const form = document.querySelector('#signup'); // first match, or null
const email = document.getElementById('email'); // no '#' with getElementById
const message = document.querySelector('.message');
form.addEventListener('submit', (event) => {
event.preventDefault(); // stop the page from reloading
const value = email.value.trim(); // read the value inside the handler
message.textContent = value ? 'Thanks, ' + value : 'Email is required';
message.classList.toggle('error', !value);
});
const item = document.createElement('li'); // build a node, then attach it
item.textContent = 'New task';
document.querySelector('#tasks').appendChild(item);

Two more patterns come up as soon as a page has a list. querySelectorAll returns every match, and you loop over it with forEach. When items get added after the page loads, attach one listener to the parent and check event.target, so new items work without their own listeners.

javascript
document.querySelectorAll('.price').forEach((cell) => {
cell.textContent = Number(cell.textContent).toFixed(2);
});
document.querySelector('#tasks').addEventListener('click', (event) => {
const item = event.target.closest('li'); // the clicked item, or null
if (item) item.classList.toggle('done');
});

For the CSS side, have the basics ready without notes. Know class, id and descendant selectors, :hover, the box model, and flexbox with justify-content and align-items. Hiding and showing is usually a hidden class you toggle from JavaScript, set to display none in the stylesheet. On the HTML side, know , the common input types, and that a Next up:Digit Sums, Composites & Array Math(Premium)

Accenture interview guide

Know what Accenture asks before you walk in.

23 coding · 5 system design · 34 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

The Accenture Online AssessmentHad your Accenture interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.