<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Khoirun Nisa Alfaini on Medium]]></title>
        <description><![CDATA[Stories by Khoirun Nisa Alfaini on Medium]]></description>
        <link>https://medium.com/@khoirunna?source=rss-54226ead583a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*bzKr_d2ImCfrLQGE.jpg</url>
            <title>Stories by Khoirun Nisa Alfaini on Medium</title>
            <link>https://medium.com/@khoirunna?source=rss-54226ead583a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 17:46:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@khoirunna/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploring San Francisco Bikeshare Public Data Using BigQuery]]></title>
            <link>https://medium.com/@khoirunna/exploring-san-francisco-bikeshare-public-data-using-bigquery-ab2f709a59dc?source=rss-54226ead583a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab2f709a59dc</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[relational-databases]]></category>
            <dc:creator><![CDATA[Khoirun Nisa Alfaini]]></dc:creator>
            <pubDate>Sun, 11 Dec 2022 16:48:29 GMT</pubDate>
            <atom:updated>2022-12-11T16:48:29.006Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Each bike station’s capacity (dockcount), ordered by its capacity</li></ol><pre>select<br>  name, dockcount<br>from<br>  `bigquery-public-data.san_francisco.bikeshare_stations`<br>order by<br>  dockcount</pre><p>2. Landmark with the most bike stations</p><pre>select<br>  landmark, count(name) as stations_num<br>from<br>  `bigquery-public-data.san_francisco.bikeshare_stations`<br>group by<br>  landmark<br>order by<br>  stations_num desc<br>limit 1</pre><p>3. Start-End station names with the most trips</p><pre>select<br>  start_station_name,<br>  end_station_name,<br>  count(trip_id) as trips_num<br>from<br>  `bigquery-public-data.san_francisco.bikeshare_trips`<br>group by<br>  start_station_name,<br>  end_station_name<br>order by<br>  trips_num desc</pre><p>4. Average trip duration in minutes for each subcription type</p><pre>select<br>  subscriber_type, avg(duration_sec / 60) as avg_duration_min<br>from<br>  `bigquery-public-data.san_francisco.bikeshare_trips`<br>group by<br>  subscriber_type</pre><p>5. Total duration and number of trips from every station cointains “Redwood” in its name</p><pre>select<br>  start_station_name,<br>  sum(trip_id) as trips_num,<br>  sum(duration_sec / 60 / 60) as duration_hr<br>from<br>  `bigquery-public-data.san_francisco.bikeshare_trips`<br>where<br>  start_station_name like &#39;%Redwood%&#39; <br>group by<br>  start_station_name</pre><p>6. Most trips’ destination landmark</p><pre>select<br>  end_station_name,<br>  landmark,<br>  sum(trip_id) as trips_num<br>from<br>    `bigquery-public-data.san_francisco.bikeshare_trips` as trips<br>  left join<br>    `bigquery-public-data.san_francisco.bikeshare_stations` as stations<br>   on <br>    trips.end_station_id = stations.station_id<br>group by<br>  end_station_name, landmark<br>order by<br>  trips_num desc<br>limit 1</pre><p>7. Destination’s latitude-longitude with the most trips</p><pre>select<br>  end_station_name,<br>  latitude,<br>  longitude,<br>  sum(trip_id) as trips_num<br>from<br>  `bigquery-public-data.san_francisco.bikeshare_trips` as trips<br>  left join<br>    `bigquery-public-data.san_francisco.bikeshare_stations` as stations<br>   on <br>    trips.end_station_id = stations.station_id<br>group by<br>  end_station_name, latitude, longitude<br>order by<br>  trips_num desc<br>limit 1</pre><p>8. Average and total distance of each bike numbers</p><pre>select<br>  bike_number, <br>  avg(dist_in_m) as avg_dist_m, <br>  sum(dist_in_m) as total_dist_m<br>from<br>  (select<br>    st_distance(<br>        st_geogpoint(start_lon, start_lat),<br>        st_geogpoint(end_lon,   end_lat)<br>      ) as dist_in_m,<br>    starts.bike_number<br>  from<br>    (select <br>      start_station_name,<br>      latitude as start_lat,<br>      longitude as start_lon,<br>      bike_number,<br>      trip_id<br>    from<br>        `bigquery-public-data.san_francisco.bikeshare_trips` as trips<br>      left join<br>        `bigquery-public-data.san_francisco.bikeshare_stations` as stations<br>      on <br>        trips.start_station_id = stations.station_id) as starts<br>  left join<br>    (select <br>      end_station_name,<br>      latitude as end_lat,<br>      longitude as end_lon,<br>      bike_number,<br>      trip_id<br>    from<br>        `bigquery-public-data.san_francisco.bikeshare_trips` as trips<br>      left join<br>        `bigquery-public-data.san_francisco.bikeshare_stations` as stations<br>      on <br>        trips.end_station_id = stations.station_id) as ends<br>    on ends.trip_id = starts.trip_id)<br>group by<br>  bike_number<br>order by<br>  total_dist_m desc</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab2f709a59dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>