# \#challenge:sqlite

**URL:** https://forum.codecrafters.io/tag/challenge-sqlite/4.md

[Latest](https://forum.codecrafters.io/latest.md) · [Categories](https://forum.codecrafters.io/categories.md) · [Tags](https://forum.codecrafters.io/tags.md)

---

## [Test always times out, even when I just print hi](https://forum.codecrafters.io/t/test-always-times-out-even-when-i-just-print-hi/16278)

<div class="topic-metadata">

**Author:** [@adarsh-kishore786](https://forum.codecrafters.io/u/adarsh-kishore786)\
**Replies:** 1\
**Last updated:** [September 14, 2026, 3:29pm UTC](https://forum.codecrafters.io/t/test-always-times-out-even-when-i-just-print-hi/16278 "2026-09-14T15:29:37Z")

</div>

I’m stuck on Stage #ND9 of building Sqlite using Clojure. My tests are always timing out, no errors, it just times out. Locally everything is running, even your\_program.sh. $ clj -M -m sqlite.core backup.db "select co…

---

## [Retrieve data using a full-table scan #ws9 - column id's serial type code is NULL](https://forum.codecrafters.io/t/retrieve-data-using-a-full-table-scan-ws9-column-ids-serial-type-code-is-null/16083)

<div class="topic-metadata">

**Author:** [@magnusram05](https://forum.codecrafters.io/u/magnusram05)\
**Replies:** 2\
**Last updated:** [May 3, 2026, 12:17am UTC](https://forum.codecrafters.io/t/retrieve-data-using-a-full-table-scan-ws9-column-ids-serial-type-code-is-null/16083 "2026-05-03T00:17:07Z")

</div>

column id’s serial type code is NULL, but the test is expecting a number to be printed in the output \[tester::#WS9\] Expected \[1052|Silver St. Cloud (New Earth) 252|Dolphin (New Earth) 2668|Pasquale Galante, Jr. (New Ear…

---

## [Writing our own tests](https://forum.codecrafters.io/t/writing-our-own-tests/16001)

<div class="topic-metadata">

**Author:** [@WashingtonARamos](https://forum.codecrafters.io/u/WashingtonARamos)\
**Replies:** 3\
**Last updated:** [March 23, 2026, 8:47pm UTC](https://forum.codecrafters.io/t/writing-our-own-tests/16001 "2026-03-23T20:47:34Z")

</div>

Hi, I was curious to know if we can write our own unit tests or if it’s not possible? I understand you guys have a testing suite but I also wanted to write some unit tests for the code I’m writing and apparently GoogleTe…

---

## [Tests not working in sqlite challenge](https://forum.codecrafters.io/t/tests-not-working-in-sqlite-challenge/15672)

<div class="topic-metadata">

**Author:** [@NandaNxD](https://forum.codecrafters.io/u/NandaNxD)\
**Replies:** 3\
**Last updated:** [December 18, 2025, 4:19am UTC](https://forum.codecrafters.io/t/tests-not-working-in-sqlite-challenge/15672 "2025-12-18T04:19:05Z")

</div>

codecrafters-sqlite-java % codecrafters test Initiating test run… :high\_voltage: This is a turbo test run. Turbo test runs - CodeCrafters Running tests on your code. Logs should appear shortly… \[compile\] WARNING: A t…

---

## [Stuck on - Count rows in a table #nd9](https://forum.codecrafters.io/t/stuck-on-count-rows-in-a-table-nd9/15622)

<div class="topic-metadata">

**Author:** [@Lemour-sudo](https://forum.codecrafters.io/u/Lemour-sudo)\
**Replies:** 2\
**Last updated:** [December 5, 2025, 7:16am UTC](https://forum.codecrafters.io/t/stuck-on-count-rows-in-a-table-nd9/15622 "2025-12-05T07:16:08Z")

</div>

I cannot seem to find the rootpage when reading page-1’s schema table. I also tried using the existing sqlite3 cli on my machine but it prints the following when I run SELECT \* FROM sqlite\_master; table|apples|apples|2…

---

## [\[SQLite\] #SZ4 Stuck trying to read the table leaf cells](https://forum.codecrafters.io/t/sqlite-sz4-stuck-trying-to-read-the-table-leaf-cells/15347)

<div class="topic-metadata">

**Author:** [@scorpion-917](https://forum.codecrafters.io/u/scorpion-917)\
**Replies:** 3\
**Last updated:** [October 5, 2025, 11:34am UTC](https://forum.codecrafters.io/t/sqlite-sz4-stuck-trying-to-read-the-table-leaf-cells/15347 "2025-10-05T11:34:09Z")

</div>

I’m stuck on Stage and #SZ4. I am using Rust to go through this challenge. The problem I am facing is about how to extract the table names from the cells. From what I understand, in order to get the location of the cells…

---

## [Reconnect my project/repo with codecrafters](https://forum.codecrafters.io/t/reconnect-my-project-repo-with-codecrafters/15338)

<div class="topic-metadata">

**Author:** [@vanzei](https://forum.codecrafters.io/u/vanzei)\
**Replies:** 2\
**Last updated:** [September 25, 2025, 2:44pm UTC](https://forum.codecrafters.io/t/reconnect-my-project-repo-with-codecrafters/15338 "2025-09-25T14:44:34Z")

</div>

Good morning, I had issues with my pc and had to replace it, and after cloning the project from github, I’m not sure how I also connect to the codecrafters repo. I’m running codecrafters test and returns the following …

---

## [\#AZ9 Do I have to implement my own SQL tokenizer and parser?](https://forum.codecrafters.io/t/az9-do-i-have-to-implement-my-own-sql-tokenizer-and-parser/15319)

<div class="topic-metadata">

**Author:** [@sleep-paralysis-daemon](https://forum.codecrafters.io/u/sleep-paralysis-daemon)\
**Replies:** 1\
**Last updated:** [September 23, 2025, 1:55am UTC](https://forum.codecrafters.io/t/az9-do-i-have-to-implement-my-own-sql-tokenizer-and-parser/15319 "2025-09-23T01:55:45Z")

</div>

Stage instructions don’t specify how one should go about processing “SELECT name FROM apples” command, but I suspect just hardcoding “return values of second row in table ‘apples’” would be wrong. Hence, I started makin…

---

## [\#SZ4 Why do I need to drop "sqlite\_sequence" from .tables display?](https://forum.codecrafters.io/t/sz4-why-do-i-need-to-drop-sqlite-sequence-from-tables-display/15240)

<div class="topic-metadata">

**Author:** [@sleep-paralysis-daemon](https://forum.codecrafters.io/u/sleep-paralysis-daemon)\
**Replies:** 7\
**Last updated:** [August 31, 2025, 9:34pm UTC](https://forum.codecrafters.io/t/sz4-why-do-i-need-to-drop-sqlite-sequence-from-tables-display/15240 "2025-08-31T21:34:06Z")

</div>

Task #3 requires to print names of all tables in a database. From the previous task we know that the number of tables in sample.db is 3. I do as the task says and extract 3 records (cells) with 3 names: “apples”, “sqlit…

---

## [\[SQLite\] #NZ8 test always timing out](https://forum.codecrafters.io/t/sqlite-nz8-test-always-timing-out/15208)

<div class="topic-metadata">

**Author:** [@mabhi256](https://forum.codecrafters.io/u/mabhi256)\
**Replies:** 2\
**Last updated:** [August 26, 2025, 10:45pm UTC](https://forum.codecrafters.io/t/sqlite-nz8-test-always-timing-out/15208 "2025-08-26T22:45:04Z")

</div>

I have implemented index scan, but the the test seems to time out even after printing out the results. Instead of telling me if the output is correct or not, it waits for the time-out every time. It always times out …

---

## [SQLite retrieving data using index times out when testing](https://forum.codecrafters.io/t/sqlite-retrieving-data-using-index-times-out-when-testing/14024)

<div class="topic-metadata">

**Author:** [@Qirall79](https://forum.codecrafters.io/u/Qirall79)\
**Replies:** 6\
**Last updated:** [August 26, 2025, 10:44pm UTC](https://forum.codecrafters.io/t/sqlite-retrieving-data-using-index-times-out-when-testing/14024 "2025-08-26T22:44:26Z")

</div>

I’m stuck on Stage #nz8. I’ve tried testing the test queries manually using the 1GB database, everything seems to be fast and not exceed 1 second (I know testing environment is different), but I keep getting 20s timeout…

---

## [Inspecting superheroes.db I find duplicate rows in leaf pages](https://forum.codecrafters.io/t/inspecting-superheroes-db-i-find-duplicate-rows-in-leaf-pages/14293)

<div class="topic-metadata">

**Author:** [@johnlonganecker](https://forum.codecrafters.io/u/johnlonganecker)\
**Replies:** 2\
**Last updated:** [August 5, 2025, 2:53pm UTC](https://forum.codecrafters.io/t/inspecting-superheroes-db-i-find-duplicate-rows-in-leaf-pages/14293 "2025-08-05T14:53:28Z")

</div>

My code goes through and finds all leaf pages than searches them for matches. My code is returning duplicate entries. I noticed for example for Charlie the Owl (New Earth). if you look at page 41 and 83 you can find entr…

---

## [\#nz8 Test pass without an index](https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811)

<div class="topic-metadata">

**Author:** [@HowieTKL](https://forum.codecrafters.io/u/HowieTKL)\
**Replies:** 3\
**Last updated:** [July 13, 2025, 12:16am UTC](https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811 "2025-07-13T00:16:28Z")

</div>

For the last stage I have not yet implemented the index lookup. Something seems amiss because my code is taking ~7s yet it passes the final stage test… \[tester::#NZ8\] Running tests for Stage #NZ8 (Retrieve data using an…

---

## [Sqlite3 (the real one, not the one I'm building) reports error on sample.db](https://forum.codecrafters.io/t/sqlite3-the-real-one-not-the-one-im-building-reports-error-on-sample-db/13182)

<div class="topic-metadata">

**Author:** [@MatrixFrog](https://forum.codecrafters.io/u/MatrixFrog)\
**Replies:** 4\
**Last updated:** [July 7, 2025, 6:08pm UTC](https://forum.codecrafters.io/t/sqlite3-the-real-one-not-the-one-im-building-reports-error-on-sample-db/13182 "2025-07-07T18:08:49Z")

</div>

I’m just barely starting the sqlite challenge. My code for #dr6 works, but I tried the “real” sqlite for comparison, and I get an error. $ ./your\_program.sh sample.db .dbinfo database page size: 4096 $ sqlite3 sample.db…

---

## [\#nz8 Index b-tree interior cells contain payload (key + rowid) that is found in Index b-tree leaf cells](https://forum.codecrafters.io/t/nz8-index-b-tree-interior-cells-contain-payload-key-rowid-that-is-found-in-index-b-tree-leaf-cells/8490)

<div class="topic-metadata">

**Author:** [@ruiyigan](https://forum.codecrafters.io/u/ruiyigan)\
**Replies:** 4\
**Last updated:** [April 20, 2025, 9:03am UTC](https://forum.codecrafters.io/t/nz8-index-b-tree-interior-cells-contain-payload-key-rowid-that-is-found-in-index-b-tree-leaf-cells/8490 "2025-04-20T09:03:27Z")

</div>

Hello, I like to check my understanding on this matter. Is it true that for table b-trees, all data resides in leaf cells but for index b-trees data is stored both in the interior and leaf cells (It is stored as payload …

---

## [Failing to find rows by index](https://forum.codecrafters.io/t/failing-to-find-rows-by-index/4440)

<div class="topic-metadata">

**Author:** [@botirk38](https://forum.codecrafters.io/u/botirk38)\
**Replies:** 2\
**Last updated:** [April 6, 2025, 4:17pm UTC](https://forum.codecrafters.io/t/failing-to-find-rows-by-index/4440 "2025-04-06T16:17:03Z")

</div>

I’m stuck on Stage #nz8 Ive tried following the comment below the actual stage first finding the matched rows using the index nodes, I successfully found those but when I look for those rows by traversing the leaf nodes…

---

## [Seeing an issue when I'm parsing the \`sqlite\_schema\` table the same as other tables](https://forum.codecrafters.io/t/seeing-an-issue-when-im-parsing-the-sqlite-schema-table-the-same-as-other-tables/4268)

<div class="topic-metadata">

**Author:** [@aca123321](https://forum.codecrafters.io/u/aca123321)\
**Replies:** 4\
**Last updated:** [March 30, 2025, 4:45pm UTC](https://forum.codecrafters.io/t/seeing-an-issue-when-im-parsing-the-sqlite-schema-table-the-same-as-other-tables/4268 "2025-03-30T16:45:22Z")

</div>

I’m stuck on Stage #AZ9 I’ve tried to parse the schema cells as we do for other table cells and I see that this doesn’t give me correct results (ie. the sql (column at index 4 of the sqlite\_schema table) column is incom…

---

## [\#CE0 Tests pass with \`database page count - 1\`](https://forum.codecrafters.io/t/ce0-tests-pass-with-database-page-count-1/4317)

<div class="topic-metadata">

**Author:** [@ivanbgd](https://forum.codecrafters.io/u/ivanbgd)\
**Replies:** 3\
**Last updated:** [January 24, 2025, 4:53pm UTC](https://forum.codecrafters.io/t/ce0-tests-pass-with-database-page-count-1/4317 "2025-01-24T16:53:00Z")

</div>

Hello, I’d just like to point out that tests for the stage " Print number of TABLES #CE0" pass if we print database PAGE count - 1 which is easy to fetch from the DB header. This happens with multiple different test DBs…

---

## [\#SZ4 stage: Unintended characters appearing in output when test cases are run](https://forum.codecrafters.io/t/sz4-stage-unintended-characters-appearing-in-output-when-test-cases-are-run/4245)

<div class="topic-metadata">

**Author:** [@aca123321](https://forum.codecrafters.io/u/aca123321)\
**Replies:** 4\
**Last updated:** [January 17, 2025, 12:36pm UTC](https://forum.codecrafters.io/t/sz4-stage-unintended-characters-appearing-in-output-when-test-cases-are-run/4245 "2025-01-17T12:36:37Z")

</div>

I’m stuck on Stage #SZ4 stage I’ve tried writing to stdout using the process.stdout.write method but to no avail. Here are my logs: Initiating test run... ⚡ This is a turbo test run. https://codecrafters.io/turbo Ru…

---

## [Page number of first overflow page](https://forum.codecrafters.io/t/page-number-of-first-overflow-page/3820)

<div class="topic-metadata">

**Author:** [@aimer101](https://forum.codecrafters.io/u/aimer101)\
**Replies:** 3\
**Last updated:** [January 14, 2025, 6:57am UTC](https://forum.codecrafters.io/t/page-number-of-first-overflow-page/3820 "2025-01-14T06:57:33Z")

</div>

I am currently at the last challenge and just realised i didn’t handle any overflow page yet I somehow test all the tests. Does the current test case doesn’t have any page number of first overflow page?

---

## [SQL parser syntax error in Golang](https://forum.codecrafters.io/t/sql-parser-syntax-error-in-golang/2961)

<div class="topic-metadata">

**Author:** [@silentstranger5](https://forum.codecrafters.io/u/silentstranger5)\
**Replies:** 3\
**Last updated:** [November 16, 2024, 6:07am UTC](https://forum.codecrafters.io/t/sql-parser-syntax-error-in-golang/2961 "2024-11-16T06:07:39Z")

</div>

I’m stuck on Stage #AZ9 I’ve tried to parse sql field from sqlite\_schema table. I am using golang and it is suggested to use “GitHub - xwb1989/sqlparser: SQL Parser implemented in Go” package for SQL parsing. However, p…

---

## [Why is the database that tests are being run on in #AZ9 not available for debugging?](https://forum.codecrafters.io/t/why-is-the-database-that-tests-are-being-run-on-in-az9-not-available-for-debugging/2883)

<div class="topic-metadata">

**Author:** [@Convl](https://forum.codecrafters.io/u/Convl)\
**Replies:** 7\
**Last updated:** [November 12, 2024, 11:37am UTC](https://forum.codecrafters.io/t/why-is-the-database-that-tests-are-being-run-on-in-az9-not-available-for-debugging/2883 "2024-11-12T11:37:36Z")

</div>

I’m stuck on Stage #AZ9 of the SQLite challenge. When I debug my code using the provided sample.db, it works exactly as it should, but when the tester runs it, it is unhappy with the values that my code puts out. Howeve…

---

## [I need help with debugging duplicates when reading SQLite leaf interior pages](https://forum.codecrafters.io/t/i-need-help-with-debugging-duplicates-when-reading-sqlite-leaf-interior-pages/2481)

<div class="topic-metadata">

**Author:** [@rodio](https://forum.codecrafters.io/u/rodio)\
**Replies:** 9\
**Last updated:** [October 30, 2024, 2:06pm UTC](https://forum.codecrafters.io/t/i-need-help-with-debugging-duplicates-when-reading-sqlite-leaf-interior-pages/2481 "2024-10-30T14:06:55Z")

</div>

I’m stuck on Stage #WS9. It looks like I’m reading the same inforamtion from different leaf pages twice. My understanding is that the root page of the superheroes table is an interior table page. So I read its children …

---

## [Stuck on Print page size #DR6](https://forum.codecrafters.io/t/stuck-on-print-page-size-dr6/2530)

<div class="topic-metadata">

**Author:** [@dlimx](https://forum.codecrafters.io/u/dlimx)\
**Replies:** 4\
**Last updated:** [October 23, 2024, 4:34pm UTC](https://forum.codecrafters.io/t/stuck-on-print-page-size-dr6/2530 "2024-10-23T16:34:34Z")

</div>

I’m stuck on Stage #DR6 for SQLite. The tests are all passed, and there’s a banner for " You can now mark Print page size as complete! :tada:". However, “Your Task” is still in progress, and there’s no way to complete …

---

## [Sqllite challenge - table columns with a serial type of integer are not being returned](https://forum.codecrafters.io/t/sqllite-challenge-table-columns-with-a-serial-type-of-integer-are-not-being-returned/2384)

<div class="topic-metadata">

**Author:** [@burgerj03](https://forum.codecrafters.io/u/burgerj03)\
**Replies:** 2\
**Last updated:** [October 15, 2024, 6:27am UTC](https://forum.codecrafters.io/t/sqllite-challenge-table-columns-with-a-serial-type-of-integer-are-not-being-returned/2384 "2024-10-15T06:27:39Z")

</div>

When trying to complete stage #WS9, I’ve started to notice that the column serial type coming back for integer types has a value of 0. For example, here are the logs when I tried to query the superheroes db file: parse…

---

## [Stuck on stage #WS9 when trying to read the superheroes database](https://forum.codecrafters.io/t/stuck-on-stage-ws9-when-trying-to-read-the-superheroes-database/2361)

<div class="topic-metadata">

**Author:** [@burgerj03](https://forum.codecrafters.io/u/burgerj03)\
**Replies:** 6\
**Last updated:** [October 14, 2024, 5:39am UTC](https://forum.codecrafters.io/t/stuck-on-stage-ws9-when-trying-to-read-the-superheroes-database/2361 "2024-10-14T05:39:17Z")

</div>

I’m stuck on Stage #WS9 - Retrieve data using a full-table scan. When reading from the sample superheroes database, I’m getting unexpected varint values back when trying to parse the recordSize from the cell and the sc…

---

## [Sqlite varint decoding Stage #SZ4](https://forum.codecrafters.io/t/sqlite-varint-decoding-stage-sz4/1934)

<div class="topic-metadata">

**Author:** [@rodio](https://forum.codecrafters.io/u/rodio)\
**Replies:** 6\
**Last updated:** [September 26, 2024, 9:21am UTC](https://forum.codecrafters.io/t/sqlite-varint-decoding-stage-sz4/1934 "2024-09-26T09:21:01Z")

</div>

I’m stuck on Stage #SZ4 I’m trying to understand where does this part come from? How does 8147 become 199? 81 47 // Serial type for sqlite\_schema.sql (varint): 199 // Size of sqlite\_schema.sql = …

---

## [Strange error at test runs](https://forum.codecrafters.io/t/strange-error-at-test-runs/1922)

<div class="topic-metadata">

**Author:** [@FykerF](https://forum.codecrafters.io/u/FykerF)\
**Replies:** 2\
**Last updated:** [September 22, 2024, 6:54pm UTC](https://forum.codecrafters.io/t/strange-error-at-test-runs/1922 "2024-09-22T18:54:56Z")

</div>

I’m stuck on Stage 3 While importing inputs to the main() from sys I get strange error at the stdout, but when I tested it with the same string, though, hardcoded - output was correct. Here are my logs: \[tester::#SZ4\]…

---

## [Solution isn't showing in Code Examples](https://forum.codecrafters.io/t/solution-isnt-showing-in-code-examples/1775)

<div class="topic-metadata">

**Author:** [@caquinn7](https://forum.codecrafters.io/u/caquinn7)\
**Replies:** 3\
**Last updated:** [September 18, 2024, 3:22pm UTC](https://forum.codecrafters.io/t/solution-isnt-showing-in-code-examples/1775 "2024-09-18T15:22:30Z")

</div>

I’ve completed Stage #NZ8 (Retrieve data using an index) in Gleam, but my solution isn’t showing in the Code Examples tab. My solution is displayed on the previous stages though.

---

## [Compiler messages cause tests to fail](https://forum.codecrafters.io/t/compiler-messages-cause-tests-to-fail/1338)

<div class="topic-metadata">

**Author:** [@edgerunner](https://forum.codecrafters.io/u/edgerunner)\
**Replies:** 7\
**Last updated:** [August 28, 2024, 10:28am UTC](https://forum.codecrafters.io/t/compiler-messages-cause-tests-to-fail/1338 "2024-08-28T10:28:06Z")

</div>

I’m trying to go through Stage #ND9 (Count rows in a table), but I hit a wall. The test suite looks at the CLI output, but the Gleam compiler messages cause the tests to fail. I need a way to silence those, but I have no…

[Next page](https://forum.codecrafters.io/tag/challenge-sqlite/4.md?match_all_tags=true&page=1&tags%5B%5D=challenge%3Asqlite)
