From 88a94d835910422797833d477ee01c771ff4c113 Mon Sep 17 00:00:00 2001 From: nohanlon3254 Date: Thu, 16 Oct 2025 15:45:06 -0500 Subject: [PATCH] Modify SQL query to find longest book title Updated SQL query to select the longest book title from BooksDB. --- sql-part-2/studio/SQL-Part-2-Studio.ipynb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sql-part-2/studio/SQL-Part-2-Studio.ipynb b/sql-part-2/studio/SQL-Part-2-Studio.ipynb index f335becb6..28ed8f0ac 100644 --- a/sql-part-2/studio/SQL-Part-2-Studio.ipynb +++ b/sql-part-2/studio/SQL-Part-2-Studio.ipynb @@ -63,7 +63,11 @@ { "cell_type": "code", "source": [ - "-- Code here:" + select top 1 len(title) as title_length, title +from BooksDB.dbo.books +ORDER BY title_length desc +--186 characters: Soccernomics: Why England Loses, Why Germany and Brazil Win, and Why the U.S., Japan, Australia, Turkey--and Even Iraq--Are Destined to Become the Kings of the World's Most Popular Sport +--THE LONGEST TITLE ], "metadata": { "azdata_cell_guid": "fc1a211d-ea4e-446a-bbf8-e31499c50aba" @@ -391,4 +395,4 @@ "execution_count": 9 } ] -} \ No newline at end of file +}