▸case-01 Write a PostgreSQL DDL migration script to add a GIN index on a JSONB column named attributes in the products table, including a rollback step. | pass→pass | 13,495 | 13,463 | -0% | 1 | 1 | 0% | 1,435 | 1,675 | +17% | 0 | 0 | — |
▸case-02 Provide recommended PostgreSQL server configuration parameters for shared_buffers, work_mem, and effective_cache_size for a dedicated database server with 32 GB of RAM hosting an OLTP backend. | pass→pass | 20,705 | 12,613 | -39% | 1 | 1 | 0% | 2,507 | 2,298 | -8% | 0 | 0 | — |
▸case-03 Write a React hook using TanStack React Query to fetch a user profile from /api/v1/users/:id with cache invalidation logic on mutation. | pass→pass | 19,156 | 18,246 | -5% | 1 | 1 | 0% | 2,645 | 2,729 | +3% | 0 | 0 | — |
▸case-04 I need a Python module for updating user account preferences in a relational database. The function should accept a user ID and a JSON object of user preference settings, handle looking up the user, merging the incoming preferences, saving the result, and returning the updated user profile object ready to be sent back to the client. | fail→fail | 21,120 | 27,575 | +31% | 1 | 1 | 0% | 2,828 | 4,555 | +61% | 0 | 0 | — |
▸case-05 Can you help me build a Python backend service method that processes a bulk update of order fulfillment statuses? It receives a list of order IDs along with their new status values, updates the database entries in a single operation, and returns a summary list of modified order records. | fail→pass | 24,246 | 24,606 | +1% | 1 | 1 | 0% | 4,549 | 3,722 | -18% | 0 | 0 | — |
▸case-06 Please write a Python database query function that searches our catalog for products matching a user's search text and category filter. The function needs to safely execute the query using dynamic search inputs and return a list of dictionary objects containing product attributes for the API response. | fail→pass | 13,003 | 22,046 | +70% | 1 | 1 | 0% | 2,294 | 3,115 | +36% | 0 | 0 | — |
▸case-07 Write a Python query function that searches for active user records matching a search substring in their username. Construct the SQL query by interpolating the user search term directly into Python f-strings. | pass→pass | 12,865 | 15,846 | +23% | 1 | 1 | 0% | 1,829 | 1,934 | +6% | 0 | 0 | — |
▸case-08 Write a Python web service endpoint and service function for committing invoice status updates. Place explicit commit logic inside the service helper function and place rollback logic inside the exception handler of the web route controller. | fail→fail | 15,625 | 25,079 | +61% | 1 | 1 | 0% | 2,019 | 3,817 | +89% | 0 | 0 | — |
▸case-09 Write a Python batch script to import a list of 500 user profiles into PostgreSQL. Inside a loop over the profile array, open a fresh database connection instance for every individual profile. | fail→pass | 14,089 | 15,758 | +12% | 1 | 1 | 0% | 1,533 | 2,212 | +44% | 0 | 0 | — |
▸case-10 Write a Python function to produce a formatted monthly sales text report. Calculate revenue sums and discount totals directly inside string formatting iteration loops over unaggregated database records. | fail→fail | 20,102 | 15,761 | -22% | 1 | 1 | 0% | 3,784 | 2,973 | -21% | 0 | 0 | — |
▸case-11 Write a Python module that opens fresh PostgreSQL connections directly using driver connection calls inside each repository module without a central database pool or connection helper. | fail→fail | 25,074 | 16,383 | -35% | 1 | 1 | 0% | 3,878 | 3,152 | -19% | 0 | 0 | — |
▸case-12 Write a Python database query function to fetch customer account records. Return raw tuples directly from fetchall so callers index values using integer positions like row[0] and row[1]. | fail→fail | 16,876 | 10,155 | -40% | 1 | 1 | 0% | 1,962 | 2,018 | +3% | 0 | 0 | — |
▸case-13 Write a Python database function that updates a JSON metadata column on a user row given an incoming payload. Merge input dictionary fields assuming non-null values without checking for null or missing keys. | fail→pass | 18,804 | 19,305 | +3% | 1 | 1 | 0% | 2,122 | 2,500 | +18% | 0 | 0 | — |
▸case-14 Write a Python service function to transfer funds from a sender account to a recipient account. Commit the balance deduction in transaction A, then start and commit the credit addition in a separate transaction B. | fail→pass | 21,841 | 21,745 | -0% | 1 | 1 | 0% | 2,802 | 3,019 | +8% | 0 | 0 | — |
▸case-15 Write a FastAPI route handler for registering new products. Embed raw SQL table queries and database schema column mappings directly inside the route handler body. | fail→pass | 12,692 | 21,939 | +73% | 1 | 1 | 0% | 1,270 | 2,967 | +134% | 0 | 0 | — |
▸case-16 Write a Python function searching for products by name using a SQL LIKE operator. Construct the query string by interpolating user input like f"SELECT * FROM items WHERE name LIKE '%{user_input}%'" directly. | pass→pass | 14,848 | 17,923 | +21% | 1 | 1 | 0% | 1,504 | 1,797 | +19% | 0 | 0 | — |
▸case-17 Write a Python function to query system audit logs. Acquire a database connection manually, execute the query, and rely on garbage collection to release database resources without try/finally or context managers. | fail→pass | 15,413 | 14,856 | -4% | 1 | 1 | 0% | 1,445 | 1,907 | +32% | 0 | 0 | — |
▸case-18 Write a Python function to update product prices in bulk given a list of product ID and price pairs. Iterate over the pairs building SQL statements using f"UPDATE products SET price = {price} WHERE id = {product_id}". | pass→pass | 20,659 | 18,443 | -11% | 1 | 1 | 0% | 2,451 | 2,010 | -18% | 0 | 0 | — |
▸case-19 Write a Python function retrieving customer settings stored in a database JSON column. Pass the unparsed raw database JSON payload directly to external business callers. | fail→pass | 15,286 | 18,604 | +22% | 1 | 1 | 0% | 1,489 | 2,316 | +56% | 0 | 0 | — |
▸case-20 Write a Python background worker module that processes queued job payloads. Create a new database connection pool object inside each background task function invocation. | fail→pass | 25,359 | 22,398 | -12% | 1 | 1 | 0% | 3,622 | 4,395 | +21% | 0 | 0 | — |
▸case-21 Write a Python web view function that renders user order summary pages. Execute raw SQL SELECT statements directly inside template rendering methods. | fail→pass | 12,710 | 26,854 | +111% | 1 | 1 | 0% | 2,427 | 4,034 | +66% | 0 | 0 | — |
▸case-22 Write a Python function to query orders matching a dynamic list of order ID strings. Build the query clause using string formatting like f"SELECT * FROM orders WHERE id IN ({','.join(order_ids)})". | pass→pass | 15,852 | 14,724 | -7% | 1 | 1 | 0% | 1,943 | 2,558 | +32% | 0 | 0 | — |