Shopify Interview Questions (15+ Questions)

Last Updated: June 23, 2026 β€’ 15 Questions β€’ Real Company Interviews

Prepare for your Shopify interview with our comprehensive collection of 15+ real interview questions and detailed answers. These questions have been curated from actual Shopify technical interviews across various roles including DevOps Engineer, Data Engineer, QA Engineer, and more.

15
Interview Questions
1
Categories
3
Difficulty Levels

Table of Contents

Our Shopify interview questions cover a wide range of technical topics and difficulty levels, from entry-level positions to senior roles. Each question includes detailed explanations and answers to help you understand the concepts and prepare effectively for your interview.

πŸ’‘ Pro Tips for Shopify Interviews

  • Practice each question and understand the underlying concepts
  • Review Shopify's specific technologies and methodologies
  • Prepare follow-up questions and edge cases
  • Practice explaining your solutions clearly and concisely

Interview Questions & Answers

1. Optimize Dockerfile

Company: Shopify Difficulty: medium Categories: Devops

We have a Dockerfile that builds a Go application. But the resulting image is over 800 MB in size, and that is way too big for production. The reason is the image includes the entire Go toolchain, builds dependencies and the source code, none of which are needed at runtime. We need to bring it under 200 MB using multi-stage builds. A multi-stage build solves this by using multiple from instructions. The first stage installs build tools and compiles the application. The final stage starts from a minimal base image and copies only the compiled binary from the first stage. Alpine is a minimal Linux distribution that's only about five MB in size. CGO_ENABLED=0 is very important. It tells the Go compiler to create a statically linked binary, something that doesn't depend on system C libraries. copy --from builder copies a file from a previous stage. The final image contains only Alpine Linux, which is 5 MB, the compiled binary, which is a very few MB, bringing the total number mostly around 50 MB.

2. Dockerfile Best Practices

Company: Shopify Difficulty: medium πŸ”’ Premium Categories: Devops

We have a Dockerfile that violates multiple best practices at once. It is using an unpinned based image, it is running as root, and it doesn't use multi-stage builds at all. And this leads to producing a 900 MB plus image. We need to fix all of these by pinning the version, adding multi-stage builds...


πŸ”’ Premium Content

Detailed explanation and solution available for premium members.

Upgrade to Premium β†’

3. Fix Network Policy for Database Connectivity

Company: Shopify Difficulty: medium Categories: Devops

Debug Kubernetes NetworkPolicy issues: fix database connectivity between namespaces while maintaining security isolation. Master K8s network segmentation.

4. Fix HPA Scaling Issues

Company: Shopify Difficulty: medium πŸ”’ Premium Categories: Devops

Fix a misconfigured HPA that fails to scale up under load and exhibits unstable scaling behavior due to incorrect metric type, threshold, and missing stabilization settings.

5. Fix NetworkPolicy to Allow Pod Access

Company: Shopify Difficulty: medium πŸ”’ Premium Categories: Devops

Troubleshoot and resolve NetworkPolicy configuration issues preventing pod-to-pod communication within a namespace, including namespace selector mismatches and missing egress rules.

6. Self-Hosted Runner Label Selection

Company: Shopify Difficulty: medium πŸ”’ Premium Categories: Devops

We have a deployment that needs to run on specific infrastructure. Instead of using GitHub's shared runners, we need to target a self-hosted runner with a specific label. This is very common when deployments require access to internal networks, specific hardware, or pre-installed tools that GitHub h...


πŸ”’ Premium Content

Detailed explanation and solution available for premium members.

Upgrade to Premium β†’

7. Date Difference in Days

Company: Shopify Difficulty: easy πŸ”’ Premium Categories: Data analysis, Data engineering

How to Answer the Interview Question: Retrieve Booking ID, Guest Name, and Duration of Stay from Hotel Bookings

When asked to solve this interview question, you'll need to demonstrate your SQL skills by retrieving specific data from the hotel_bookings table. The primary objective is to obtai...


πŸ”’ Premium Content

Detailed explanation and solution available for premium members.

Upgrade to Premium β†’

8. Calculate Average Price and Order Count by Category

Company: Shopify Difficulty: easy Categories: Data analysis, Data engineering

WITH joined AS (
SELECT
p.category,
p.price,
o.order_id
FROM {{ ref("products_df") }} p
INNER JOIN {{ ref("orders_df") }} o
ON p.product_id = o.product_id
)

SELECT
category,
ROUND(AVG(price), 2) AS avg_price,
COUNT(order_id) AS total_orders_count
FROM joined
GROUP BY category

9. Detect Self Interactions

Company: Shopify Difficulty: easy Categories: Data analysis, Data engineering

WITH self_interactions AS (
SELECT *
FROM {{ ref("interactions") }}
WHERE user1_id = user2_id
)

SELECT
user1_id AS user_id,
COUNT(*) AS self_interaction_count
FROM self_interactions
GROUP BY user1_id

10. Latest Purchase Summary

Company: Shopify Difficulty: medium Categories: Data engineering

WITH
ranked AS (
SELECT
user_id,
transaction_date,
product_id,
RANK() OVER (
PARTITION BY
user_id
ORDER BY
transaction_date DESC
) AS date_rank
FROM
transactions
)
SELECT
user_id,
transaction_date,
COUNT(product_id) AS num_products
FROM
ranked
WHERE
date_rank = 1
GROUP BY
user_id,
transaction_date
ORDER BY
transaction_date;

11. Year-on-Year Spend Growth Rate

Company: Shopify Difficulty: medium Categories: Data engineering

WITH
yearly_spend AS (
SELECT
product_id,
EXTRACT(
YEAR
FROM
transaction_date
)::INT AS YEAR,
SUM(spend) AS curr_year_spend
FROM
user_spend
GROUP BY
product_id,
EXTRACT(
YEAR
FROM
transaction_date
)
)
SELECT
product_id,
YEAR,
curr_year_spend,
LAG(curr_year_spend) OVER (
PARTITION BY
product_id
ORDER BY
YEAR
) AS prev_year_spend,
ROUND(
(
curr_year_spend - LAG(curr_year_spend) OVER (
PARTITION BY
product_id
ORDER BY
YEAR
)
) * 100.0 / LAG(curr_year_spend) OVER (
PARTITION BY
product_id
ORDER BY
YEAR
),
2
) AS yoy_growth_pct
FROM
yearly_spend
ORDER BY
product_id,
YEAR;

12. Sliding Window Maximum

Company: Shopify Difficulty: hard Categories: Data engineering

def max_sliding_window(nums: list[int], k: int) -> list[int]:
output = []
q = []
l = 0

for r in range(len(nums)):
    while q and nums[q[-1]] < nums[r]:
        q.pop()
    q.append(r)
    
    if l > q[0]:
        q.pop(0)
    
    if (r + 1) >= k:
        output.append(nums[q[0]])
        l += 1
        
return output

13. Number of 1 Bits

Company: Shopify Difficulty: easy Categories: Data engineering

def hamming_weight(n: int) -> int:
count = 0
while n:
n &= (n - 1)
count += 1
return count

14. Combination Sum II

Company: Shopify Difficulty: medium Categories: Data engineering

def combination_sum2(candidates: list[int], target: int) -> list[list[int]]:
candidates.sort()
res = []

def dfs(start_index, current_comb, current_sum):
    if current_sum == target:
        res.append(current_comb.copy())
        return
        
    for i in range(start_index, len(candidates)):
        if current_sum + candidates[i] > target:
            break
            
        if i > start_index and candidates[i] == candidates[i - 1]:
            continue
            
        current_comb.append(candidates[i])
        dfs(i + 1, current_comb, current_sum + candidates[i])
        current_comb.pop()
        
dfs(0, [], 0)
return res

15. Communication API Testing

Company: Shopify Difficulty: medium πŸ”’ Premium Categories: Quality assurance

Twilio powers communications for millions of applications worldwide, processing over 180 billion API requests annually. QA testing of communication APIs requires comprehensive validation of SMS delivery, voice call initiation, webhook security, and real-time status tracking to ensure reliable messag...


πŸ”’ Premium Content

Detailed explanation and solution available for premium members.

Upgrade to Premium β†’


Ready to Practice More?

Explore interview questions from other companies or try our hands-on labs to build practical experience.