Skip to content

Commit

Permalink
fix : queries not passing test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroLanaspa committed Oct 23, 2024
1 parent 9432696 commit 88d95d4
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions crates/proof-of-sql/examples/movies/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,4 @@ fn main() {
&prover_setup,
&verifier_setup,
);

// Query 3: Calculate the total duration and count of movies by genre
// Note: We're using SUM and COUNT instead of AVG because the current version
// of the SQL parser doesn't support the AVG function. You can calculate the
// average by dividing total_duration by movie_count.
prove_and_verify_query(
"SELECT genre, SUM(duration) AS total_duration, COUNT(*) AS movie_count FROM movies GROUP BY genre ORDER BY total_duration DESC",
&accessor,
&prover_setup,
&verifier_setup,
);

// Query 4: Find movies released in the 90s with a rating above 8.5
prove_and_verify_query(
"SELECT title, year, rating FROM movies WHERE year >= 1990 AND year < 2000 AND rating > 8.5 ORDER BY rating DESC",
&accessor,
&prover_setup,
&verifier_setup,
);
}

0 comments on commit 88d95d4

Please sign in to comment.