<jupyter_start><jupyter_text>How SQL Work - Understanding the implementation![Imgur](https://i.imgur.com/g55maqS.png)  &128209; Contents1. Introduction    1.1 Defination Of SQL     1.2 Relational Databases    1.3 Connection Database 2. Implementation     2.1 Import Libraries     2.2 Database connection code     2.3  Initial exploration of the Dataset     2.4 Overview of Analysis     2.5 SQL Code Implementation  &128253; 1. Introduction<jupyter_code>%%html
<style>
@import url('https://fonts.googleapis.com/css?family=Ewert|Roboto&effect=3d|ice|');
body {background-color: gainsboro;} 
a {color: #37c9e1; font-family: 'Roboto';} 
h1 {color: #37c9e1; font-family: 'Orbitron'; text-shadow: 4px 4px 4px #aaa;} 
h2, h3 {color: slategray; font-family: 'Orbitron'; text-shadow: 4px 4px 4px #aaa;}
h4 {color: #818286; font-family: 'Roboto';}
span {font-family:'Roboto'; color:black; text-shadow: 5px 5px 5px #aaa;}  
div.output_area pre{font-family:'Roboto'; font-size:110%; color:lightblue;}      
</style<jupyter_output><empty_output><jupyter_text>&128203; 1.1  Defination of SQL:SQL is a conceptual language for working with data stored in databases. In our case, SQLite is the specific implementation. Most SQL languges share all of the capabilities in this doc. The differences are usually in performance and advances analytical funcionalities (and sometimes bugs of course). Eventually, we will use SQL lunguage to write queries that would pull data from the DB, manipulate it, sort it, and extract it.![Imgur](https://i.imgur.com/3V5m8s5.jpg)The most important component of the DB is its tables - that's where all the data stored. Usually the data would be devided to many tables, and not stored all in one place (so designing the data stracture propely is very important). Most of this script would handle how to work with tables. Other than tables, there are some other very useful concepts/features that we won't talk about:* table creation* inserting / updating data in the DB* functions - gets a value as an input, and returns manipulation of that value (for example function that remove white spaces)  &128206; 1.2  Relational Databases:A relational database is, simply, a database that stores related information across multiple tables and allows you to query information in more than one table at the same time.It's easier to understand how this works by thinking through an example. Imagine you're a business and you want to keep track of your sales information. You could set up a spreadsheet in Excel with all of the information you want to keep track of as separate columns: Order number, date, amount due, shipment tracking number, customer name, customer address, and customer phone number.![Imgur](https://i.imgur.com/QhbmFgq.png)  Sales data in Excel &128070; ![Imgur](https://i.imgur.com/KCj0fP8.png)Sales data in a relational database &128070;With a relational database, like the one in the above diagram, you avoid all of these issues. You could set up two tables, one for orders and one for customers. The 'customers' table would include a unique ID number for each customer, along with the name, address and phone number we were already tracking. The 'orders' table would include your order number, date, amount due, tracking number and, instead of a separate field for each item of customer data, it would have a column for the customer ID. This enables us to pull up all of the customer info for any given order, but we only have to store it once in our database rather than listing it out again for every single order.  &128268; 1.3  Connection Database:The basic structure of the query is very simple: You define what you want to see after the SELECT, * means all possible columns You choose the table after the FROM You add the conditions for the data you want to use from the table(s) after the WHERE![Imgur](https://i.imgur.com/gSEqsbo.jpg)The stracture, and the order of the sections matter, while spaces, new lines, capital words and indentation are there to make the code easier to read.  &128187; Implementation  &128229; 2.1  Import LibrariesWe will start by importing the Python libraries we will be using in this analysis. These libraries include:* sqllite3 for interacting with a local relational database; * pandas  for data ingestion .<jupyter_code>import sqlite3
import pandas as pd<jupyter_output><empty_output><jupyter_text>&128268; 2.2 Database Connection Code<jupyter_code>path = "../input/" 
database = path + 'hubway.db'

conn = sqlite3.connect(database)
tables = pd.read_sql("""SELECT *
                        FROM sqlite_master
                        WHERE type='table';""", conn)
print("Conection SuccessFull",conn)<jupyter_output>Conection SuccessFull <sqlite3.Connection object at 0x7f51d66f3570><jupyter_text>&128197; 2.3 Initial exploration of the DatasetLet's start by taking a look at our database. The database has two tables, trips and stations. To begin with, we'll just look at the trips table, which contains the following columns:*` id `— A unique integer that serves as a reference for each trip.*`duration` — The duration of the trip, measured in seconds.*`start_date` — The date and time the trip began.*`start_station` — An integer that corresponds to the id column in the stations table for the station the trip started.*`end_date` — The date and time the trip ended.*` end_station` — The 'id' of the station the trip ended.*` bike_number` — Hubway's unique identifier for the bike used on the trip.*`sub_type` — The subscription type of the user. "Registered" for users with a membership, "Casual" for users without a membership.*`zip_code`— The zip code of the user (only available for registered members).*`birth_date` — The birth year of the user (only available for registered members).*`gender` — The gender of the user (only available for registered members). Now, we will need to read the dataset using the commands below.Note: Make sure Database connection before you run the data load and read code below.df is a variable pointing to a pandas data frame.<jupyter_code>df = pd.read_sql_query("SELECT * FROM trips", conn)
df<jupyter_output><empty_output><jupyter_text>&128240; 2.4 Overview of AnalysisIn this Notebook I will  try cover up some Question By SQL Code or Command,Here are some Question:* What was the duration of the longest trip?* How many trips were taken by 'registered' users?* What was the average trip duration?* Do registered or casual users take longer trips?* Which bike was used for the most trips?* What is the average duration of trips by users over the age of 30?  &128187; 2.5 SQL Code ImplementationThe SQL code or commands we'll use to answer these questions are:    1. SELECT    2. LIMIT    3.  ORDER BY    4.WHERE    5.COUNT    6.Aggregate Functions(SUM,AVG,MIN,MAX)    7.GROUP BY    8. Arithmetic Operators    9. JOIN      &128505; 1. SELECT SELECT will be the foundation of almost every query you write - it tells the database which columns you want to see. You can either specify columns by name (separated by commas) or use the wildcard `*` to return every column in the table. In addition to the columns you want to retrieve, you also have to tell the database which table to get them from. To do this you use the keyword `FROM` followed by the name of the table. For example, if we wanted to see the start_date and bike_number for every trip in the trips table, we could use the following query:<jupyter_code>pd.read_sql_query("SELECT start_date, bike_number FROM trips;",conn)<jupyter_output><empty_output><jupyter_text>&128681; Note:In this example, we started with the SELECT command so that the database knows we want it to find us some data. Then we told the database we were interested in the start_date and bike_number columns. Finally we used FROM to let the database know that the columns we want to see are part of the trips table.One important thing to be aware of when writing SQL queries is that the language requires every query to end with a semicolon (;).  &128208; 2. LIMIT The next command we need to know before we start to run queries on our Hubway database is LIMIT. LIMIT simply tells the database how many rows you want it to return. The SELECT query we looked at in the previous section would return the requested information for every row in the trips table, but sometimes that could mean a lot of data and you might not want all of it. If, instead, we wanted to see the start_date and bike_number for the first five trips in the database, we could add LIMIT to our query as follows:<jupyter_code>pd.read_sql_query("SELECT start_date, bike_number FROM trips LIMIT 5;",conn)<jupyter_output><empty_output><jupyter_text>We simply added the LIMIT command and then a number representing the number of rows we want to be returned. In this instance we used 5, but you can replace that with any number to get the appropriate amount of data for the project you're working on.We will use LIMIT a lot in our queries on the Hubway database in this notebook - the trips table contains over a 1.5 million rows of data and we certainly don't need to display all of those to answer the questions we're going to be working on.Let's run our first query on the Hubway database. First we will store our query as a string and then use the function we defined earlier to run it on the database. Take a look at the following example:<jupyter_code>df =pd.read_sql_query("SELECT * FROM trips LIMIT 5;",conn) 
df<jupyter_output><empty_output><jupyter_text>This query uses`*` as a wildcard instead of specifying columns to return. This means the `SELECT` command has given us every column in the trips table. We also used the`LIMIT` function to restrict the output to the first five rows of the table.The previous example returned every column in the trips table. If we were only interested in the duration and start_date columns, we could replace the wildcard with the column names as follows:<jupyter_code>df=pd.read_sql_query("SELECT duration, start_date FROM trips LIMIT 5",conn)
df<jupyter_output><empty_output><jupyter_text>&128225; 3. ORDER BYThe final command we need to know before we can answer the first of our questions is `ORDER BY`. This command allows you to sort the database on a given column. To use it, you simply specify the name of the column you would like to sort on. By default, `ORDER BY` sorts in ascending order. If you would like to specify which order the database should be sorted, you can add the keyword `ASC` for ascending order or `DESC` for descending order. For example, if we wanted to sort the trips table from the shortest duration to the longest we could add the following line to our query:<jupyter_code>df=pd.read_sql_query("SELECT duration FROM trips ORDER BY duration ASC",conn)
df<jupyter_output><empty_output><jupyter_text>**3.1** With the `SELECT`, `LIMIT` and `ORDER BY` commands in our repertoire, we can now attempt to answer our first question: **What was the duration of the longest trip?**To answer this question, it's helpful to break it down into sections and identify which commands we will need to address each part. First we need to pull the information from the duration column of the trips table. Then, to find which trip is the longest, we can sort the duration column in descending order. Here's how you might work this through to come up with a query that will get the information you're looking for:* Use `SELECT` to retrieve the duration column FROM the trips table.* Use `ORDER BY` to sort the duration column and use the `DESC` keyword to specify that you want to sort in descending order.* Use `LIMIT` to restrict the output to 1 row.Let's go ahead and run this query and find out how long the longest trip lasted.<jupyter_code>df=pd.read_sql_query("SELECT duration FROM trips ORDER BY duration DESC LIMIT 1;",conn)
df<jupyter_output><empty_output><jupyter_text>Now we know that the longest trip lasted 9999 seconds, or a little over 166 minutes. With a maximum value of 9999, however, we don't know whether this is really the length of the longest trip or if the database was only set up to allow a four digit number.* Let's try running the same query as before, but adjust the `LIMIT` to return the 10 highest durations and see if that's the case:<jupyter_code>df=pd.read_sql_query("SELECT duration FROM trips ORDER BY duration DESC LIMIT 10",conn)
df<jupyter_output><empty_output><jupyter_text>&128681; Note:What we see here is that there aren't a whole bunch of trips at 9999, so it doesn't look like we're cutting off the top end of our durations, but it's still difficult to tell whether that's the real length of the trip or just the maximum allowed value. Hubway charges additional fees for rides over 30 minutes (somebody keeping a bike for 9999 seconds would have to pay an extra $25 in fees) so it's plausible that they decided 4 digits would be sufficient to track the majority of rides.  &128640; 4. WHERE The previous commands are great for pulling out sorted information for particular columns, but what if you already have a specific subset of the data you want to look at? That's where `WHERE` comes in. The `WHERE` command allows you to use a logical operator to specify which rows should be returned. For example you could use the following command to return every trip taken with bike `B00400`:<jupyter_code>pd.read_sql_query("SELECT bike_number from trips  WHERE bike_number = 'B00400' LIMIT 10 ",conn)<jupyter_output><empty_output><jupyter_text>&128681; Note:You'll also notice that we use quote marks in this query. That's because the bike_number is stored as a string. If the column contained numeric data types the quote marks would not be necessary. **4.1** Let's write a query that uses WHERE to return every column in the trips table for each row with a duration longer than 9990 seconds:<jupyter_code>df=pd.read_sql_query("SELECT * FROM trips WHERE duration > 9990;",conn)
df<jupyter_output><empty_output><jupyter_text>&128681; Note: As you can see, the query returned 14 different trips, each with a duration of 9990 seconds or more. Something that stands out about this query is that all but one of the results has a `sub_type` of `"Casual"`. Perhaps this is an indication that `"Registered"` users are more aware of the extra fees for long trips and maybe Hubway could do a better job of conveying their pricing structure to Casual users to help them avoid overage charges. **4.2** We can also combine multiple logical tests in our `WHERE` clause using `AND` or `OR`. If, for example, in our previous query we had only wanted to return the trips with a duration over 9990 seconds that also had a `sub_type` of `Registered`, we could use `AND` to specify both conditions. I also recommend using parentheses to separate each logical test. This isn't strictly required for the code to function, but they can make your queries easier to understand as you increase the complexity. Let's run that query now. We already know it should only return one result, so it should be easy to check that we've got it right:<jupyter_code>df=pd.read_sql_query("SELECT * FROM trips WHERE (duration >= 9990) AND (sub_type = 'Registered')ORDER BY duration DESC;",conn)
df<jupyter_output><empty_output><jupyter_text>&128207; 5. COUNTThe next question we set out at the beginning of the notebook is **"How many trips were taken by `'registered'` users?" ** To answer it, we could run the same query as above and modify the `WHERE` expression to return all of the rows where `sub_type` is equal to `'Registered'` and then count them up. You could count them up on the screen, however, SQL actually has a built in command to do the work for us, `COUNT`.This allows us to shift the calculation to the database and save us the trouble of writing additional scripts to count up results. To use it, you simply include `COUNT(column_name)` instead of (or in addition to) the columns you want to `SELECT`, like this:<jupyter_code>pd.read_sql_query("SELECT COUNT(id) FROM trips ",conn)<jupyter_output><empty_output><jupyter_text>&128681; Note: In this instance, it doesn't matter which column we choose to count because every column should have data for each row in our query, but sometimes a query might have missing (or "null") values for some rows. If you're not sure whether a column contains null values you can run your `COUNT` on the id column - the id column is never null, so you can be sure your count won't have missed anything. You can also use `COUNT(1)` or `COUNT(*)` to count up every row in your query. Let's take a look at a query to answer our question. We can use `SELECT COUNT(*)` to count up the total number of columns returned and `WHERE` `sub_type` = "Registered" to make sure we only count up the trips taken by Registered users.<jupyter_code>df=pd.read_sql_query("SELECT COUNT(*) FROM trips WHERE sub_type = 'Registered';",conn)
df<jupyter_output><empty_output><jupyter_text>This query worked and has returned the answer to our question, but the column heading isn't particularly descriptive. If you want to make your results more readable, you can use AS to give your output an alias (or nickname). If we wanted to re-run the previous query but give our column heading an alias of Total Trips by Registered Users, we could do the following:<jupyter_code>df=pd.read_sql_query(' ' ' SELECT COUNT(*) AS "Total Trips by Registered Users" FROM trips WHERE sub_type = "Registered";' ' ' ,conn)
df<jupyter_output><empty_output><jupyter_text>&128223; 5. Aggregate Functions(SUM,AVG,MIN,MAX)`COUNT` is not the only trick SQL has in this domain. You can also use `SUM, AVG, MIN` and `MAX` to return the sum, average, minimum and maximum of a column respectively. These, along with `COUNT`, are known as aggregate functions. So to answer our third question,** "What was the average trip duration?"**, we can use the `AVG` function on the duration column (and, once again, use AS to give our output column a more descriptive name):<jupyter_code>df=pd.read_sql_query(' ' ' SELECT AVG(duration) AS "Average Duration" FROM trips;  ' ' ' ,conn )
df<jupyter_output><empty_output><jupyter_text>&128681; Note:So it turns out that the average trip duration is 912 seconds, which is about 15 minutes. This makes some sense since we know that Hubway charges extra fees for trips over 30 minutes because the service is designed for riders to take short, one-way trips. But what about our next question, do registered or casual users take longer trips? We already know one way to answer this question - we can run two `SELECT AVG(duration)`` FROM` trips queries with `WHERE `clauses that restrict one to "Registered" and one to "Casual" users. SQL also includes a way that we can answer this question in a single query, using the GROUP BY command.  &128218; 6.GROUP BY `GROUP` BY separates the rows into groups based on the contents of a particular column and allows us to perform aggregate functions on each group. To get a better idea of how this works, let's take a look at the gender column. Each row can have one of three possible values in the gender column, "Male", "Female" or Null (missing - we don't have gender data for casual users). When we use GROUP BY, the database will separate out each of the rows into a different group based on the value in the gender column, in much the same way that you might separate a deck of cards into different suits. You can imagine making two piles, one of all the males, one of all the females.So let's walk through exactly how to write a query to answer our question of whether registered or casual users take longer trips.* As with each of our queries so far, we'll start with `SELECT` to tell the database which information we want to see. In this instance, we'll want `sub_type` and `AVG(duration)`.* We'll also include `GROUP BY` sub_type to separate out our data by subscription type and calculate the averages of registered and casual users separately.Here's what the code looks like when you put it all together:<jupyter_code>df=pd.read_sql_query(' ' '  SELECT sub_type, AVG(duration) AS "Average Duration" FROM trips GROUP BY sub_type; ' ' ',conn)
df<jupyter_output><empty_output><jupyter_text>Our next question was** which bike was used for the most trips? **and we can answer this using a very similar query. Take a look at the following example and see if you can figure out what each line is doing - we'll go through it step by step afterwards so you can check you got it right:<jupyter_code>df=pd.read_sql_query(' ' ' SELECT bike_number as "Bike Number", COUNT(*) AS "Number of Trips" FROM trips GROUP BY bike_number ORDER BY COUNT(*) DESC LIMIT 1; ' ' ',conn)
df<jupyter_output><empty_output><jupyter_text>&128681; Note:As you can see from the output, bike B00490 took the most trips. Let's run through how we got there:* The first line is a SELECT clause to tell the database we want to see the bike_number column and a count of every row. It also uses AS to tell the database to display each column with a more useful name.* The second line uses FROM to specify that the data we're looking for is in the trips table.* The third line is where things start to get a little tricky. We use GROUP BY to tell the COUNT function on line 1 to count up each value for bike_number separately.* On line four we have an ORDER BY clause to sort the table in descending order and make sure our most-used bike is at the top.* Finally we use LIMIT to restrict the output to the first row, which we know will be the bike that was used in the highest number of trips because of how we sorted the data on line four.  &128291; 7. Arithmetic OperatorsThe last of our questions about this table is a little more tricky than the others. We want to know the **average duration of trips by registered members over the age of 30**. We could just figure out the year in which 30 year olds were born in our heads and then plug it in, but a more elegant solution is to use arithmetic operations directly within our query. SQL allows us to use +, -, * and / to perform an arithmetic operation on an entire column at once.<jupyter_code>df=pd.read_sql_query(' ' ' SELECT AVG(duration) FROM trips WHERE (2017 - birth_date) > 30; ' ' ',conn )
df<jupyter_output><empty_output><jupyter_text>&128279;  8. JOINSo far we've been looking at queries that only pull data from the trips table, but you'll remember from the introduction that this database contains a second table, stations. The stations table contains information about every station in the Hubway network and includes an id column that is referenced by the trips table.![Imgur](https://i.imgur.com/Nehnebq.png)Before we start to work through some real examples on our dataset, let's take a moment to look back at the hypothetical order tracking database from earlier. In that database we had two tables, `orders` and `customers`, and they were connected by the `customer_id` column. Let's say we wanted to write a query that returned the `order_number` and `name` for every order in the database. If they were both stored in the same table, we could use the following query: **```SELECT order_number, name FROM orders;```**  &128681; Note:Unfortunately order_number column and the name column are stored in two different tables, so we have to add a few extra steps.  * Let's take a moment to think through the additional things the database will need to know before it can return the information we want:* Which table is the order_number column in?* Which table is the name column in?* How is the information in the orders table connected to the information in the customers table? To answer the first two of these questions, we can include the table names for each column in our `SELECT` command. The way we do this is simply to write the table name and column name separated by a .. For example, instead of `SELECT` `order_number`, name we would write `SELECT` orders.order_number, customers.name. Adding the table names here helps the database to find the columns we're looking for by telling it which table to look in for each.To tell the database how the orders and customers tables are connected, we use `JOIN` and `ON`. `JOIN` specifies which tables should be connected and ON specifies which columns in each table are related. We're going to use an inner join, which means that rows will only be returned where there is a match in our columns specified in `ON`. In this example, we will want to use `JOIN` on whichever table we didn't include in the `FROM` command. So we can either use `FROM` orders `INNER JOIN` customers or `FROM` customers `INNER JOIN` orders. As we discussed earlier, these tables are connected on the `customer_id` column in each table. Therefore, we will want to use `ON` to tell the database that these two columns refer to the same thing like this: **```ON orders.customer_ID = customers.customer_id```** Once again we use the . to make sure the database knows which table each of these columns is in. So when we put all of this together, we get a query that looks like this: **```SELECT orders.order_number, customers.name```****```FROM orders```****```INNER JOIN customers```****```ON orders.customer_id = customers.customer_id```** This query will return the order number of every order in the database along with the customer name that is associated with each.Moving back to our Hubway database we can now write some queries to see `JOIN` in action, but before we get started we should take a look at the rest of the columns in the stations table. Here's a query to show us the first 5 rows so we can see what the stations table looks like:<jupyter_code>df=pd.read_sql_query(' ' ' SELECT * FROM stations LIMIT 5; ' ' ',conn)
df<jupyter_output><empty_output><jupyter_text>* `id` — A unique identifier for each station (corresponds to the start_station and end_station columns in the trips table)* `station` — The station name* `municipality` — The municipality that the station is in (Boston, Brookline, Cambridge or Somerville)* `lat` — The latitude of the station* `lng` — The longitude of the station* Which stations are most frequently used for round trips?* How many trips start and end in different municipalities? I'll try to answer some questions in the data, starting with ** which station is the most frequent starting point?** Let's work through it step by step:* First we want to use SELECT to return the station column from the stations table and the COUNT of the number of rows.* Next we specify the tables we want to JOIN and tell the database to connect them ON the start_station column in the trips table and the id column in the stations table.* Then we get into the meat of our query - we GROUP BY the station column in the stations table so that our COUNT will count up the number of trips for each station separatelyFinally we can ORDER BY our COUNT and LIMIT the output to a manageable number of results<jupyter_code>df=pd.read_sql_query(' ' '  SELECT stations.station AS "Station", COUNT(*) AS "Count" FROM trips  INNER JOIN stations ON trips.start_station = stations.id GROUP BY stations.station ORDER BY COUNT(*) DESC LIMIT 5; ' ' ',conn)
df<jupyter_output><empty_output><jupyter_text>&128681; Note:If you're familiar with Boston, you'll understand why these are the most popular stations. South Station is one of the main commuter rail stations in the city, Charles Street runs along the river close to some nice scenic routes and Boylston and Beacon streets are right downtown near a number of office buildings. The next question we'll look at is **which stations are most frequently used for round trips?** We can use much the same query as before. We will `SELECT` the same output columns and `JOIN` the tables in the same way, but this time we'll add a `WHERE` clause to restrict our `COUNT` to trips where the start_station is the same as the end_station.<jupyter_code>df=pd.read_sql_query(' ' ' SELECT stations.station AS "Station", COUNT(*) AS "Count" FROM trips  INNER JOIN stations ON trips.start_station = stations.id WHERE trips.start_station = trips.end_station GROUP BY stations.station ORDER BY COUNT(*) DESC LIMIT 5; ' ' ',conn)
df<jupyter_output><empty_output><jupyter_text>Finally,** how many trips start and end in different municipalities?** This question takes things a step further. We want to know how many trips start and end in a different municipality. To achieve this, we need to `JOIN` the trips table to the stations table twice. Once `ON` the start_station column and then `ON` the end_station column. In order to do this, we have to create an alias for the stations table so that we are able to differentiate between data that relates to the `start_station` and data that relates to the `end_station`. We do this in exactly the same way we've been creating aliases for individual columns to make them display with a more intuitive name, using `AS`. For example we can use the following code to `JOIN` the stations table to the trips table using an alias of 'start'. We can then combine 'start' with our column names using . to refer to data that comes from this specific `JOIN` (rather than the second `JOIN` we will do `ON` the `end_station` column):  **INNER JOIN stations AS start ON trips.start_station = start.id** Here's what the final query will look like when we run it:<jupyter_code>df=pd.read_sql_query(' ' '  SELECT COUNT(trips.id) AS "Count" FROM trips INNER JOIN stations AS start ON trips.start_station = start.id INNER JOIN stations AS end ON trips.end_station = end.id WHERE start.municipality <> end.municipality;' ' ',conn)
df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.060699414333592876, 'fraction_numerical': 0.013507566268323234, 'mean_word_length': 4.76953125, 'pattern_counts': {'":': 0, '<': 104, '<?xml version=': 0, '>': 106, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '25', 'dir': 'jupyter-structured-clean-dedup', 'id': '587524', 'license': 'MIT', 'n_tokens_mistral': 7974, 'n_tokens_neox': 7454, 'n_words': 4542, 'path': 'how-sql-work-in-python-intro-and-usecases.ipynb', 'repo_name': 'harunurrashid97/Research-Work', 'size': '29539'}