最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sqlite - CS50 SQL PSET 4: Why doesn't check50 pass my code for "Private" even though it returns the co

programmeradmin5浏览0评论

I have been trying to solve the "private" assignment for PSET 4 of the CS50 SQL course but even though my code creates a view named "message" the check50 grader still flags my code for not doing so. Is there something wrong with my code?

DROP TABLE "cipher";
DROP TABLE "sentence_list";
DROP VIEW "message";


CREATE TABLE IF NOT EXISTS "cipher" (
    "sentence_id" INTEGER,
    "first_letter" INTEGER,
    "length" INTEGER
);

INSERT INTO "cipher" ("sentence_id", "first_letter", "length")
VALUES
(14, 98, 4),
(114, 3, 5),
(618, 72, 9),
(630, 7, 3),
(932, 12, 5),
(2230, 50, 7),
(2346, 44, 10),
(3041, 14, 5);



CREATE VIEW IF NOT EXISTS "message" AS
SELECT substr("sentence", "first_letter", "length") AS "phrase"
FROM "sentences"
JOIN "cipher" ON "sentences"."id" = "cipher"."sentence_id";

SELECT "phrase" FROM "message";

Error code

I have tried submitting a solution I found online and it passes, so it can't be that the grader is not working.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论