<?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 Elena zamfir on Medium]]></title>
        <description><![CDATA[Stories by Elena zamfir on Medium]]></description>
        <link>https://medium.com/@alissazamfir?source=rss-afae8d59a432------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*25qkO4r8VsHNd9R0qsCJWw.jpeg</url>
            <title>Stories by Elena zamfir on Medium</title>
            <link>https://medium.com/@alissazamfir?source=rss-afae8d59a432------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 03:55:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alissazamfir/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[Jameson High School Data analysis]]></title>
            <link>https://medium.com/@alissazamfir/jameson-high-school-data-analysis-1947f9665729?source=rss-afae8d59a432------2</link>
            <guid isPermaLink="false">https://medium.com/p/1947f9665729</guid>
            <dc:creator><![CDATA[Elena zamfir]]></dc:creator>
            <pubDate>Tue, 02 Apr 2024 15:27:46 GMT</pubDate>
            <atom:updated>2024-04-02T15:27:46.757Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ttJqWe8abhjYXj8cOdLOg.png" /><figcaption><a href="https://app.powerbi.com/view?r=eyJrIjoiYTEzZjU4OWMtM2FjNi00ZDJhLWFkNWItMGE4MTEwOGM1ZjI4IiwidCI6ImNlMGRmNDkyLTdmMzItNDNjZi1iMjk3LWVlMTM1NzYwZGExYiJ9">https://app.powerbi.com/view?r=eyJrIjoiYTEzZjU4OWMtM2FjNi00ZDJhLWFkNWItMGE4MTEwOGM1ZjI4IiwidCI6ImNlMGRmNDkyLTdmMzItNDNjZi1iMjk3LWVlMTM1NzYwZGExYiJ9</a></figcaption></figure><blockquote>Introduction</blockquote><p>Focusing on data analysis, then let’s take a deep look into the high school performance. This project explores a particular class from a high school with top teachers, in-demand skills, and where high skill demand meets high grades of their students.</p><blockquote>Background</blockquote><p>Curious to see and understand in-demand skills in the data analysis high school performance, to create an effective strategy, this project was created to identify if there are correlation between teachers years of experience and students performance , students average score, the difference between gender score and not only.</p><p>The origin of the data for this project comes from Purple Beard LTD Bootcamp.</p><blockquote><strong>Questions that I wanted to answer via SQL queries within the project:</strong></blockquote><blockquote><strong>What is the distribution of student performance across subjects? Are there any subjects where students consistently perform better or worse?</strong></blockquote><blockquote><strong>How does gender affect student performance?</strong></blockquote><blockquote><strong>What is the overall average performance of students in each subject? Are there any subjects where students, on average, perform better or worse?</strong></blockquote><blockquote><strong>The Education board benchmark for average scores is 70%.<br>How did the school compare against this?</strong></blockquote><blockquote><strong>Create a Measure titled ‘Performance category’ showing this:<br> based on average performance score<br>- Excellent = 70 and Above<br>- Good = 50–69<br>- At Risk = 40–49<br>- Low = 39 and below</strong></blockquote><h3>Tools</h3><p>With several key tools, I leaped into the data analyst, wielding the power of the following:</p><ul><li><strong>SQL</strong>: As the backbone of this project, I used it for analysis, allowing me to query the database to unveil meaningful insights by running SQL queries.</li><li><strong>Visual Power Bi and Power Query </strong>: my integrated development environment used for database management , dashboard visuals and reports.</li></ul><blockquote>The Method/Analysis</blockquote><p>I received data and I had to restore it into my SQL server before connecting to Power BI. Geared toward investigating the data analyst School Performance, in this project, here is how I approached each question by using queries:</p><blockquote>1. What is the distribution of student performance across subjects? Are there any subjects where students consistently perform better or worse?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FgL12hSpQ1hWxD88e4_mUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*stPzVQj2AQmY8ZAiwEQPDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*2nZcwvB5krpG8SbY6qKg7w.png" /></figure><blockquote>2. How does gender affect student performance?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UuM6lgLieuJGRH-QbVeGnQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/206/1*C-A3Gwqd10HNZBmHIOB1Eg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8T3kbGoqe0xYv__-69ndmQ.png" /></figure><blockquote>3. What is the overall average performance of students in each subject? Are there any subjects where students, on average, perform better or worse?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*XcrPIlud2DyCaYd3iAiGDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*Xpr0Ra8J47gJQocYfpuadQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krrwx35__Rj4tR2fcgMSvA.png" /></figure><blockquote>4. The Education board benchmark for average scores is 70%.<br>How did the school compare against this?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tH0UC2nAuS9sJyxwArjXEA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*Wtgh3gdB7qi2NEEydB_CJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*EpFEMiGX3CaX9lBxRHHeFQ.png" /></figure><blockquote>5. Create a Measure titled ‘Performance category’ showing this:<br> based on average performance score<br>- Excellent = 70 and Above<br>- Good = 50–69<br>- At Risk = 40–49<br>- Low = 39 and below</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e1E7nHHyjX2gueFwMDT0zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*eq25qLhEuMBeKEnkt1fOpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*ECZXz468F5eBRdMTXY6TYg.png" /></figure><blockquote>Conclusion</blockquote><p><strong>Subject Performance</strong>: Geography and Math have the highest average scores among subjects, while History has the lowest average score. This suggests a need for improvement in History.</p><p><strong>Date of Birth Analysis</strong>: Students born in 2006 have the highest average score, while students born in 2007 have the lowest average score. This may indicate potential differences in academic readiness or other factors that should be investigated further.</p><p><strong>Gender Performance</strong>: Female students outperform male students on average. This could indicate potential differences in learning styles or teaching approaches that may need to be addressed.</p><p><strong>Yearly Performance</strong>: The worst overall performance year was 2007, while 2006 had the highest overall performance. Understanding the reasons behind these variations can provide valuable insights into factors influencing student performance.</p><p><strong>Teacher Experience</strong>: Based on my analysis I found a correlation between Teacher’s years of experience and Overall Students performance . This suggests that if a teacher has more experience , the students have a better outcome.</p><p><strong>Benchmark Comparison</strong>: The school’s average scores fall below the Education Board’s benchmark for both average scores. 70% from an maximum of 100%</p><p><strong>Attendance Impact</strong>: There is a clear correlation between attendance and student performance, with higher attendance associated with better results. This underscores the importance of promoting regular attendance among students</p><blockquote>Recommendations</blockquote><p><strong>Targeted Support for History</strong>: Provide additional resources or support for History classes to improve student performance in this subject.</p><p><strong>Addressing Gender Disparities</strong>: Investigate potential factors contributing to gender disparities in performance and implement strategies to support the academic success of all students, regardless of gender.</p><p><strong>Analyzing Birth Year Trends</strong>: Further analyze the factors contributing to differences in performance among students born in different years and implement targeted interventions as needed</p><p><strong>Identifying Reasons for Yearly Variations</strong>: Investigate the reasons behind yearly variations in performance and implement strategies to address any underlying issues.</p><p><strong>Continuous Professional Development</strong>: Teacher’s experience is an important factor in student’s outcome, and by providing ongoing professional development opportunities for teachers can enhance teaching effectiveness for the future.</p><p><strong>Strategies to Improve Benchmark Performance</strong>: Implement targeted interventions and strategies aimed at improving average scores to meet or exceed the Education Board’s benchmarks.</p><p><strong>Attendance Improvement Initiatives</strong>: Implement initiatives to promote regular attendance and address any barriers to attendance that students may face.</p><blockquote>Discussion</blockquote><p>After taking this journey, I have leveled up my SQL skillset with some versatile tools</p><ul><li><strong>Data Aggregation</strong>: Got comfortable with GROUP BY and aggregate functions such as AVG() ,COUNT() Union all, Case When Else (), to summarize data for reporting.</li><li><strong>Complex Querying</strong>: Used advanced SQL and stealthily merged tables, built common table expressions (CTEs), and optimized query performance by modifying scripts.</li><li><strong>Analytical Thinking</strong>: Developed my problem-solving skills, translating questions into meaningful and actionable insights and be able to create recommendations based on my work.</li></ul><blockquote>Closing Thoughts</blockquote><p>This project further developed my SQL skills and enhanced my understanding of the data, especially the data analytics in schools/departments. Exploring and analyzing this data emphasizes the importance of continuous learning and the importance of understanding trends within industries and market environments. By doing this analysis, the project findings serve as a resource for suggesting skill development and job searching.</p><p>For many other information and Problem solved , please use the link below and it will bring you to my Power Bi Server Page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xz7lkqslXhq48_k4mxpBUg.png" /><figcaption><a href="https://app.powerbi.com/view?r=eyJrIjoiYTEzZjU4OWMtM2FjNi00ZDJhLWFkNWItMGE4MTEwOGM1ZjI4IiwidCI6ImNlMGRmNDkyLTdmMzItNDNjZi1iMjk3LWVlMTM1NzYwZGExYiJ9">https://app.powerbi.com/view?r=eyJrIjoiYTEzZjU4OWMtM2FjNi00ZDJhLWFkNWItMGE4MTEwOGM1ZjI4IiwidCI6ImNlMGRmNDkyLTdmMzItNDNjZi1iMjk3LWVlMTM1NzYwZGExYiJ9</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1947f9665729" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Paper Company Database Analysis with SQL]]></title>
            <link>https://medium.com/@alissazamfir/paper-company-database-analysis-with-sql-e11d22eae43b?source=rss-afae8d59a432------2</link>
            <guid isPermaLink="false">https://medium.com/p/e11d22eae43b</guid>
            <dc:creator><![CDATA[Elena zamfir]]></dc:creator>
            <pubDate>Wed, 06 Mar 2024 12:42:40 GMT</pubDate>
            <atom:updated>2024-03-09T18:06:24.561Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*ZrhMrIATz7M1tdB10HU2Qw.jpeg" /></figure><p>Paper <em>XYZ </em>Company is in need of our assistance to use their data to help them run the business, a paper company which has increased its area of development in other locations working with its best products: 3 types of paper : <em>Standard, Gloss and Poster</em>. Based on above we will try to find top regions and top accounts that made the highest amount of orders and sells, sum of amount ordered by Year , individual sales and channels by connecting Excel to SQL Database and creating tables that help us to respond to all questions we need.</p><p>In this Project I will share about SQL, especially the SQL challenge that I’ve worked. This SQL challenges improved my logical thinking to solve the problem through the query language.</p><blockquote><strong>Project Background:</strong></blockquote><p>Paper <em>XYZ</em> is a company that sells paper. They have 50 sales reps spread across 4 regions in America and they sell 3 types of papers: Standard, Gloss and Poster. Their customers are large companies they attract by advertising on Google, Facebook and Twitter</p><p>In the Paper XYZ database there are five tables (essentially 5 spreadsheets):</p><p><strong>web_events, accounts, orders, sales_reps and region.</strong></p><blockquote><strong>Data Preparation</strong></blockquote><p><strong>Create database and schema:</strong></p><p>For this case study, we received from the company a schema that we can use to understand the relationships between tables and respond to all further questions :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*ihtwldOTgQ1UP5WZ9LYLlw.png" /></figure><blockquote><strong>Project Goal</strong></blockquote><p>Paper XYZ Company needs our help to gain insights to provide a better, more personalized experience for it’s sales, channels, region and accounts including:</p><ul><li>orders by each category</li><li>Total amount ordered and sales by each category</li><li>web events and channels</li><li>top accounts</li><li>salles in time</li></ul><blockquote><strong>Problems Questions</strong></blockquote><p>1. What are the top 5 accounts that placed the highest total amount of orders in usd</p><p>2. What was the smallest order placed by each account in terms of the total usd. Provide only two columns -the account name and the total usd. Order from the smallest dollar amount to the largest</p><p>3. Determine the number of times a particular channel was used in the web_events table for each sales rep. Your final table should have three columns — the name of the sales rep, the channel and the number of occurrences.</p><p>4. Show the sum of amount ordered by Year</p><p>5. Who was the primary contact associated with the earliest web event?</p><p>6. What was the smallest order placed by each account in terms of the total usd. Provide only two columns — the account name and the total usd. Order from the Smallest dollar amount to the largest</p><p>7. Determine the number of times a particular channel was used in the web_events table for each sales rep. The final table should have three columns — the name of the sales rep, the channel and the number of occurences.</p><p>8. Determine the number of times a particular channel was used in the web_events table for each region. The final table should have three columns — the region name, the channel and the number of occurences.Order your table with the highest number of occurences first</p><p>9. Has any sales_rep worked on more than one account?</p><p>10. Write a query to display the number of orders in each of three categories, based on the total number of items in each order. The three categories are: ‘At Least 2000’, ‘Between 1000 and 2000’, and ‘Less than 1000’</p><blockquote><strong>Analysis and Visualization</strong></blockquote><p>Q1. What are the top 5 accounts that placed the highest total amount of orders in usd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ze6GYUWUvM6tbx2OyySzEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*q340ns2YBhLI4IWKIyfFdQ.png" /></figure><p>Q2. What was the smallest order placed by each account in terms of the total usd. Provide only two columns -the account name and the total usd. Order from the smallest dollar amount to the largest</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sXPvNVzSh_QSWwrgsDN0Jg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*8YrIc7I9BP3mw7Q1S1oEAQ.png" /></figure><p>Q3.Determine the number of times a particular channel was used in the web_events table for each sales rep. Your final table should have three columns — the name of the sales rep, the channel and the number of occurrences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z3qgN83YWJQUvaSnNapeAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*NlaJM32-dN5SiE4HYLE6Lg.png" /></figure><p>Q4.Show the sum of amount ordered by Year</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qxLqE_aVIzalNxViQGU2vA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/243/1*b5eDAEfuftPvz_In6vmBpA.png" /></figure><p>Q5.Who was the primary contact associated with the earliest web event?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJlNJ1wHRAe_syWFLUpT3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*4C7Kak0PFlqzFgc7Q51bOw.png" /></figure><p>Q6.What was the smallest order placed by each account in terms of the total usd. Provide only two columns — the account name and the total usd. Order from the Smallest dollar amount to the largest</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oiZaYzaRyh-I7hoFoYdDwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*F6W60UfIXJf7vFvG3S3F1g.png" /></figure><p>Q7.Determine the number of times a particular channel was used in the web_events table for each sales rep. The final table should have three columns — the name of the sales rep, the channel and the number of occurences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VaAuZEuVmZAxoGhD-ELo6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*Zrb51K2AZdTK3vM3WeRYgA.png" /></figure><p>Q8.Determine the number of times a particular channel was used in the web_events table for each region. The final table should have three columns — the region name, the channel and the number of occurences.Order your table with the highest number of occurences first</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fAV9Wxh56bDGZq-RPeN3Bg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*PBWILfmpRRdkEh9zP_CD1g.png" /></figure><p>Q9.Has any sales_rep worked on more than one account?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTnXuit5FcaCRIX9aD6wGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*2bnNLDSC-OqXxBA4GE_RCQ.png" /></figure><p>Q10.Write a query to display the number of orders in each of three categories, based on the total number of items in each order. The three categories are: ‘At Least 2000’, ‘Between 1000 and 2000’, and ‘Less than 1000’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rk9SxVazGjDRKtMQVmaluw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*l4ip0U0RV-SaSyp0NkLg3Q.png" /></figure><blockquote><strong>Insight</strong></blockquote><ul><li>After a thorough analysis, I discovered that the top accounts that succeeded to place the highest amount of orders are : EOG , Mosaic, IBM, General Dynamics and Republic Service .</li><li>The top 5 accounts that order the most quantity of standard paper : Core-Mark Holding, State Fram Insurance, Kohl’s Travelers Cors and Cigna.</li><li>The region that has made the most important sales is Northeast</li><li>the highest amount of sales was made in 2016 — $12864917.92</li></ul><blockquote><strong>Recommendation :</strong></blockquote><ul><li>Find out what makes standard paper a favorite item for customers and invest in this area more.</li><li>With the majority of sales and profit coming from the top Accounts and Sales Representative, the company and its team can focus campaigns and budgets on loyal and potential customers.</li><li>The company should utilize customer and product information for marketing strategies that will help in get loyal customers and highest level of orders and revenue.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W1PBZerqGBZoUNK6wOa6ow.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e11d22eae43b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Restaurant data analysis]]></title>
            <link>https://medium.com/@alissazamfir/restaurant-data-analysis-15040e6fe046?source=rss-afae8d59a432------2</link>
            <guid isPermaLink="false">https://medium.com/p/15040e6fe046</guid>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[restaurant-data-analytics]]></category>
            <category><![CDATA[dashboard-design]]></category>
            <dc:creator><![CDATA[Elena zamfir]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 16:15:43 GMT</pubDate>
            <atom:updated>2024-02-22T18:36:10.041Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*98_Ay2HnBJxGETeC0e7aoA.png" /><figcaption>restaurant and cafe design.pinterest</figcaption></figure><p>I received data from the course I am part of, to analyze it and to identify the best customers that the restaurant has, how much they spend before they become a member of the restaurant, how often the customers visit the restaurant and what is the most purchased item from the restaurant .</p><p>The information we received were limited and were presented as a diagram :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*03u1E1_Zlt2xHmda2CDH0w.png" /></figure><p>Based on above, we had to check all tables and make sure we have accurate and correct writing in all tables before starting to analyze them .</p><p>Fortunately we didn’t need to do any Data Cleaning and Transformation, as all was impeccable.</p><p>All datasets exist within the dannys_diner database schema .</p><p>Table 1 — Sales —</p><p>The sales table captures all customer_id level purchases with an corresponding order_date and product_id information for when and what menu items were ordered.</p><p>Table 2 — Menu -</p><p>The menu table maps the product_id to the actual product_name and price of each menu item.</p><p>Table 3 — members</p><p>The final members table captures the join_date when a customer_id joined the beta version of the Danny’s Diner loyalty program.</p><p>Based on above , we created all tables and inserted the necessary dates using Create Table &gt; Sales/Menu/Members &lt;</p><p>and Insert values into each of them as per received from the owner.</p><p>After creating the values, we were able to respond to the Owner questions.</p><p>First think that Danny, the owner of the restaurant wanted to know was:</p><p>1. What is the total amount each customer spent at the restaurant?</p><p>Response :</p><p>select sales.customer_id, sum(menu.price) as Total_price</p><p>from sales</p><p>join menu</p><p>on sales.product_id = menu.product_id</p><p>group by sales.customer_id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*if1EzH6dcLncbW6sdfEIkA.png" /></figure><p>2. How many days has each customer visited the restaurant?</p><p>Response :</p><p>SELECT customer_id, COUNT(DISTINCT(order_date)) AS Days_visited</p><p>FROM Sales</p><p>GROUP BY customer_id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*G9PyRX_Mn0lNCK8e2va-uw.png" /></figure><p>3. When was the last time a customer purchased from the restaurant?</p><p>Response :</p><p>select sales.customer_id, max(sales.order_date) as last_day</p><p>from sales</p><p>group by customer_id</p><p>order by last_day desc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*tDFm8VMTqM830FYFDy7b9w.png" /></figure><p>4. What is the most purchased item on the menu and how many times was it purchased by all customers?</p><p>Response :</p><p>select top 1 menu.product_name , count(sales.order_date) as number_purchased</p><p>from menu</p><p>join sales</p><p>on menu.product_id = sales.product_id</p><p>group by menu.product_name</p><p>order by number_purchased desc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*7C22rjPwe4a7ZLT_hF4NBA.png" /></figure><p>5. What is the total items and amount spent for each member before they became a member?</p><p>Response :</p><p>select s.customer_id, count(s.product_id) as number_items, sum(m.price) as total_amount</p><p>from sales s</p><p>join menu m on s.product_id = m.product_id</p><p>left join members mb on s.customer_id = mb.customer_id</p><p>where s.order_date &lt; mb.join_date</p><p>group by s.customer_id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*85WM1LiEXizohhEgQQOpLQ.png" /></figure><p>6. Return ALL the customers and their join date</p><p>Response :</p><p>select min(sales.customer_id) as customers_name , members.join_date</p><p>from sales</p><p>left join members</p><p>on sales.customer_id = members.customer_id</p><p>group by join_date</p><p>order by customers_name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*XdQsV2lhXjkZjbB_5eom8A.png" /></figure><p>Here’s how the dashboard looks like :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hKYNKwWsKLUQGhP1bg-pQg.png" /></figure><p>After carefully responding to Danny’s questions, he has now a better overview regarding his restaurant and what products are bestsellers, how much time each customer spend before they become members and so much more.</p><blockquote>Written by Elena Zamfir</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15040e6fe046" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>