<?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 CHINAZA OGAZI on Medium]]></title>
        <description><![CDATA[Stories by CHINAZA OGAZI on Medium]]></description>
        <link>https://medium.com/@ogxynaza?source=rss-d8e924a2305c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*W-Uc7rMQ7hzYSuo-</url>
            <title>Stories by CHINAZA OGAZI on Medium</title>
            <link>https://medium.com/@ogxynaza?source=rss-d8e924a2305c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 16:48:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ogxynaza/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[African Countries’ International Debt Statistics: Exploring the most prominent debt metric across…]]></title>
            <link>https://medium.com/@ogxynaza/african-countries-international-debt-statistics-exploring-the-most-prominent-debt-metric-across-fe6b62da9f0a?source=rss-d8e924a2305c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe6b62da9f0a</guid>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[finance-analyst]]></category>
            <category><![CDATA[data-vizualisation]]></category>
            <category><![CDATA[finance]]></category>
            <dc:creator><![CDATA[CHINAZA OGAZI]]></dc:creator>
            <pubDate>Tue, 31 May 2022 22:21:08 GMT</pubDate>
            <atom:updated>2022-05-31T22:21:08.665Z</atom:updated>
            <content:encoded><![CDATA[<h3>African Countries’ International Debt Statistics: Exploring the most prominent debt metric across African countries</h3><p>The 2021 edition of International Debt Statistics (<a href="https://datacatalog.worldbank.org/search/dataset/0038015/international-debt-statistics">IDS 2021</a>) highlights some fascinating developments in external debt of different countries from the 6 habitable continents in the world.</p><p>One of them is the steady rise of bilateral loans from global development cooperative sources like the International Bank for Reconstruction and Development (IBRD) or the International Development Association (IDA), whose aim is to provide loans, guarantees, risk management products, and advisory services to creditworthy low-income countries, as well as to coordinate responses to regional and global challenges to Countries across the globe.</p><blockquote>“Foreign debt, also known as external debt, has been rising steadily in recent decades, with unwelcome side-effects in some borrowing countries. These include slower economic growth, particularly in low-income countries, as well as crippling debt crises, financial market turmoil, and even secondary effects such as a rise in human-rights abuses”. Investopia, 2021</blockquote><p>In line of these recent developments, I will be analyzing the most common indicator in which African countries owe their debt.</p><p>But before we delve deep into this analysis, we have to define what Foreign Debts indicators are why they are used to access loans from world Bank.</p><p>So, take a walk with me.</p><p><strong>What are International Debt Indicators?</strong></p><p>A country’s Foreign debt is referred to as money borrowed by a government from a foreign lender such as the world bank for a range of reasons.</p><p>According to a <a href="https://www.worldbank.org/en/news/speech/2022/04/13/remarks-by-world-bank-group-president-david-malpass-at-the-2022-spring-meetings-making-debt-work-for-development">remark</a> made by the World Bank Group President David Malpass, at the 2022 Spring Meetings: “Making Debt Work for Development”, A debt is said to be a double-edged sword. He implied that Foreign debt can used as driver to improve growth rate and develop infrastructure for forward-thinking developing countries or can be a means to fuel wasteful expenditure and investment posing as a major threats to economic growth and stability.</p><p><strong>However, a debt indicator answers the question “Where”. It is used to determine the area where this foreign debt is put to use by each sovereign nation.</strong></p><p>To get a fuller picture of what our analysis would like, let us get the number of African countries are covered in this our analysis.</p><p><strong>How many African Countries were listed?</strong></p><p>According to the <a href="https://datacatalog.worldbank.org/search/dataset/0038015/international-debt-statistics">IDS 2021</a>, out of 107 sovereign countries listed in the debt statistics data, African Countries (48) had the most number compared to other continent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*L0z3CbBB-dET0AGNJNZ91w.png" /></figure><p><strong>How much debt are we talking about here?</strong></p><p>from the Figure below, African countries are the third largest debt owing continent, falling behind Europe and Asia respectively. An over 30B US Dollars($) was incurred in total debt by African Countries, as at 2021.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SfDDnne5EJtTvnlE2aXCGA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJ26lLh6fIv4oGE6o_v9hQ.png" /><figcaption>Top 11 Debt owed countries in the world.</figcaption></figure><p>In Africa, top borrowers are Nigeria and Egypt. These countries have collectively borrowed a maximum sum of over 7 Trillion US Dollars from the World Bank, making them the highest so far in the continent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*n33uF7laKBroKr5CZS5kcg.png" /><figcaption>Top 10 African Countries with the Most External Debt</figcaption></figure><p><strong>What is the notable debt indicator among these African Countries?</strong></p><p>From my analysis, most African countries&#39; foreign debt is exhausted in the external debt stocks to gross national income(GNI) also known as Total external debt stocks to gross national income.. Read more<a href="https://databank.worldbank.org/metadataglossary/International-Debt-Statistics/series?search=gni%20debt%20indidcator"> here</a></p><p>see figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*OrWD0QdpUd5y4g70urZyLw.png" /></figure><p>This means that African countries take an annual loan which are owed to non residents of each individual country, repayable only through currency, goods or services. Also, the total external debt entails all the publicly non guaranteed long-term debt, and use of International Monetary Credit and short term debts.</p><blockquote>“External debt stocks (% of GNI) in Nigeria was reported at 16.94 % in 2020, according to the World Bank collection of development indicators, compiled from officially recognized sources. Nigeria — External debt stocks (% of GNI) — actual values, historical data, forecasts and projections were sourced from the <a href="https://data.worldbank.org/">World Bank</a> on May of 2022”. Trading Economics.</blockquote><p>In addition, we can see that other factors such as imports and exports of goods , Total reserves (gold ), financing external debts in stocks etc. are considered the major debt factors that influence the high rise of African Countries’ external debt reserve.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe6b62da9f0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DATA CLEANING WITH PYTHON USING THE IMDB TOP 250 MOVIES DATASET]]></title>
            <link>https://medium.com/@ogxynaza/data-cleaning-with-python-using-the-imdb-top-250-movies-dataset-240e0c5d1d44?source=rss-d8e924a2305c------2</link>
            <guid isPermaLink="false">https://medium.com/p/240e0c5d1d44</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-cleaning-with-python]]></category>
            <category><![CDATA[data-entry-jobs]]></category>
            <category><![CDATA[data-science-intern]]></category>
            <dc:creator><![CDATA[CHINAZA OGAZI]]></dc:creator>
            <pubDate>Tue, 17 May 2022 20:10:14 GMT</pubDate>
            <atom:updated>2022-05-17T20:10:14.741Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>DATA CLEANING WITH PYTHON USING THE IMDB TOP 250 MOVIES DATASET</strong></p><p><strong>Introduction</strong></p><p>Data cleaning is one of the important steps every data scientist must know. This is because , real world is full of errors and incomplete information. There is rarely a a perfect data out there. Having a cleaned data guarantees you an overall quality in your analysis and also increases productivity.</p><p>However, I will be discussing the various methods that can be used to start cleaning up data using Python’s Pandas library using a movie dataset i got from <a href="https://www.kaggle.com/datasets/gautamkarat/imdb-top-250-movies">Kaggle</a>.</p><p><strong><em>Data cleaning with Pandas</em></strong></p><blockquote><em>Here is the </em><a href="https://github.com/Gennychi/IMDB-MOVIES-EDA-DATA-CLEANING/blob/main/Data%20cleaning%20IMDB%20(1).ipynb"><em>Github link </em></a><em>to the Python Jupyter Notebook. (Do ⭐️ it if you found it useful 💛)</em></blockquote><p>First step is to import my libraries and load our dataset into jupyter notebook and use the read_csvto read our data.</p><pre>imdb = pd.read_csv(r&#39;C:\Users\HP-PC\Desktop\marketing\iMDbTop250Movies.csv&#39;)</pre><p>next I checked for missing data and represented the number of data missing in %. But before that, I used the numpy library np to calculate the mean of the null values using a for loop.</p><pre>for col in imdb.columns:<br>        pct_missing = np.mean(imdb[col].isnull())<br>        print(&#39;{} - {}%&#39;.format(col, pct_missing))</pre><p>The result below ,showed that there were minimal amount of data missing in the dataset. The Metascore score and the Budget column, has the most missing values</p><pre>Title - 0.0%<br>year - 0.0%<br>Rating - 0.004%<br>Run Time - 0.004%<br>imdb_rating - 0.0%<br>Budget - 0.088%<br>Gross_worldwide - 0.028%<br>Director - 0.0%<br>Metascore - 0.088%</pre><p>Also, I wanted to use Boolean Values to see at a quick glance the rows and columns that had missing values. So I used the .isna() function to achieve this.</p><pre>imdb_missing = imdb.isna()<br>imdb_missing.head()</pre><p>The table below shows my result. True here signifies that there is a missing value, while False means there is no Missing values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*l2gC9oU50QTCkwHyPW3IaA.png" /><figcaption><a href="https://gist.github.com/whyyoutoo/11a9d175d2f579f8c45689d1ae8b87c8#file-cleaning-ipynb">Cleaning.ipynb </a>hosted with ❤ by <a href="https://github.com/">GitHub</a></figcaption></figure><p>Next, I calculated the sum of missing values in each column. This time, I did not convert my values in percentage. And as I previously stated, the Budget and the Metascore column had the same sum of Missing values</p><pre>imdb_missing.sum()</pre><pre>Title               0<br>year                0<br>Rating              1<br>Run Time            1<br>imdb_rating         0<br>Budget             22<br>Gross_worldwide     7<br>Director            0<br>Metascore          22<br>dtype: int64</pre><p>since I do not want to alter my original data while cleaning, I had to make a copy of my data.</p><pre>df = imdb.copy()</pre><p>so since there is minimal amount of null values present in my dataset, i have to drop them but first, I need to the number of rows and columns, present in my dataset.</p><pre>df.shape</pre><p>I figured out my dataset contains 250 rows and 9 columns.</p><p>After getting the values, I used the .dropna() function to drop the rows and columns that have any ‘NA’ present.</p><pre>nm = df.dropna(how = &#39;any&#39;)<br>nm.shape<br>nm.head()</pre><p>Next, check for Data types .</p><pre>imdb3 = nm.copy()<br>imdb3.dtypes</pre><p>Most of our columns are in object data Type, except for the ‘Year’, ‘imdb_rating’ &amp; ‘Metascore’ columns. So we have to convert the Gross_worldwide , Budget and Run time columns into integers since it is filled with numbers.</p><p>I noticed that the Budget column, had (estimated) appended on the values. To remove that I used the .str.replace(r’\W’, “ ”) function to remove the brackets.</p><pre>imdb3[&#39;Budget&#39;] = imdb3[&#39;Budget&#39;].str.replace(r&#39;\W&#39;, &quot;&quot;)<br>imdb3[&#39;Budget&#39;]</pre><p>Next, I used the to remove the str.replace “estimated’’ character near the Budget values and also remove the commas in between the values.</p><pre>imdb3[&#39;Budget&#39;] = imdb3[&#39;Budget&#39;].str.replace(&quot;estimated&quot;, &quot;&quot;)<br>imdb3[&#39;Budget&#39;] = imdb3[&#39;Budget&#39;].str.replace(&quot;,&quot;,&quot;&quot;)</pre><p>In the Gross_worldwide column, I removed the dollar side ($) and the commas in between the values.</p><pre>#remove the dollar sign($) in the Gross_worldwide column<br>imdb3[&#39;Gross_worldwide&#39;] = imdb3[&#39;Gross_worldwide&#39;].str.replace(&quot;$&quot;, &quot;&quot;)</pre><pre>#remove the commas in Gross_worldwide column<br>imdb3[&#39;Gross_worldwide&#39;] = imdb3[&#39;Gross_worldwide&#39;].str.replace(&quot;,&quot;,&quot;&quot;)</pre><p>However while trying to convert the Budget and the Gross-worldwide column back to Integers, I noticed that budget values had Strings attached to them. In other to solve this, I used the .loc function to locate the the index number and manually imputed the correct values.</p><pre>imdb3.loc[169] =[&#39;Metropolis&#39;,&#39;1927&#39;, &#39;Not Rated&#39;, &#39;2h 33m&#39;, &#39;8.3&#39;,&#39;14500000&#39;, &#39;1349711&#39;,&#39;Fritz Lang&#39;, &#39;98&#39; ]<br>imdb3.loc[238] =[&#39;Léon: The Professional&#39;,&#39;1994&#39;,&#39;R&#39;,&#39;1h 50m&#39;, &#39;8.5&#39;,&#39;16000000&#39;,&#39;19552639&#39;,&#39;Luc Besson&#39;,&#39;64&#39;]<br>imdb3.loc[46] =[&#39;Blade Runner&#39;, &#39;1982&#39;,&#39;R&#39;,&#39;1h 57m&#39;, &#39;8.1&#39;,&#39;30000000&#39;,&#39;41722424&#39;, &#39;Ridely Scott&#39;,&#39;84&#39; ]<br>imdb3.loc[171]=[&#39;City of God&#39;,&#39;2002&#39;,&#39;R&#39;,&#39;2H 10m&#39;,&#39;8.6&#39;,&#39;3300000&#39;,&#39;30680793&#39;,&#39;Fernando Meirelles&#39;,&#39;  79&#39;]</pre><p>Next, I converted the Gross_worldwide, Budget, Metascore column that were previously in Object to Integer data type.</p><pre>#convert Budget and Gross_worldwide  from strings to int and Metascore from float to int<br>imdb3[&#39;Budget&#39;] = imdb3[&#39;Budget&#39;].astype(&#39;object&#39;).astype(&#39;int64&#39;)<br>imdb3[&#39;Gross_worldwide&#39;] = imdb3[&#39;Gross_worldwide&#39;].astype(&#39;object&#39;).astype(&#39;int64&#39;)<br>imdb3[&#39;Metascore&#39;] = imdb3[&#39;Metascore&#39;].astype(&#39;float&#39;).astype(&#39;int64&#39;)</pre><p>I noticed that the Run_time column cannot be converted to integer data type because, the values were written in hours and Mins. So, get the hours and Min in separate columns, I had to use the .str.split function and use the ‘’h’’ character as the place where the splitting will stop.</p><pre>imdb6[[&quot;Hour&quot;, &quot;Min&quot;]] = imdb6[&quot;Run Time&quot;].str.split(&quot;h&quot;, n=1, expand=True)</pre><p>After I have successfully separated the Run_time column into 2 different columns(Hours, Mins ), I remove the ‘m’ attached to the values, in the ‘Mins’ columns</p><pre>imdb6[&#39;Min&#39;]=imdb6[&#39;Min&#39;].str.replace(&quot;m&quot;,&quot;&quot;)</pre><p>Lastly, I saved my csv file to my desktop for further cleaning.</p><pre>to_csv = imdb_new.to_csv(r’C:\Users\HP-PC\Desktop\imdb.csv’,index = False)</pre><p>In Excel, I converted the Hours column to min by Multiplying by 60 and add the result to the Min to get my Run time in Minutes.</p><p>Thank you for reading.</p><p>You can contact me on <a href="https://twitter.com/gennygennychi?t=fn2ede4hxzk2beVWzlB2GA&amp;s=09"><em>Twitter</em></a><em> or</em><a href="https://www.linkedin.com/in/chinaza-ogazi"><em> LinkedIn</em></a><em> for further explanations.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=240e0c5d1d44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HOW TO RESPOND TO BUSINESS CASE QUESTIONS USING BASIC SQL QUERIES]]></title>
            <link>https://medium.com/@ogxynaza/how-to-respond-to-business-case-questions-using-basic-sql-queries-ddb45372b2b2?source=rss-d8e924a2305c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddb45372b2b2</guid>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[business-strategy]]></category>
            <dc:creator><![CDATA[CHINAZA OGAZI]]></dc:creator>
            <pubDate>Fri, 08 Apr 2022 14:34:40 GMT</pubDate>
            <atom:updated>2022-04-08T14:34:40.821Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wV0ZQqz_-rBw3ewFebFBtQ.jpeg" /><figcaption>Photo by Carlos Muza from Unsplash</figcaption></figure><p>Companies have no choice but to adapt and evolve as the demand to move everything into digital space increases. This also means that a large amount of data is generated on a regular basis and must be managed. As many Data Analysts professionals begin to move away from traditional spreadsheets when manipulating datasets , building models that can be used to drive informed business decisions, SQL has become increasingly popular to use for this purpose.</p><p>In this article, We’ll look at how to draw insights from a real-life business data.</p><p>The data used in this analysis, is the<strong> Global stores datasets</strong> from Kaggle. But before we delve into querying, let us define what SQL is, in a lay-man’s language.</p><p><strong>WHAT IS SQL?</strong></p><p>The acronym popularly pronounced like the English Alphabet “<em>S-Q-L” or “cee-que-l’’, </em>stands for<em> </em>Structured Querying Language. It is a programming language which is used to store, alter, and retrieve information from a relational database. It was first developed by Raymond Boyce and Chamberlin at the IBM in the early 1970s</p><p><strong>BENEFITS OF USING SQL</strong></p><p>SQL provides a variety of benefits that make it popular and in high demand and they are as follows;</p><ol><li>It is a dependable and efficient language for interacting with databases.</li><li>Ensures faster querying process when using big data— Unlike Spreadsheets, data can be effectively updated, deleted or manipulated in a matter of seconds.</li><li>Standardized Language — It provides a uniform platform to all of its users worldwide due to paperwork and years of establishment.</li></ol><p><strong>THE DOWNSIDE</strong></p><p>SQL, like any other wonderful technology, has its disadvantages, and here are a few of them:</p><ol><li>SQL has a challenging interface that makes some users feel uneasy when working with the database.</li><li>Cost — Some versions are prohibitively expensive for acquire or set up.</li><li>Partial Control — Due to hidden business rules, the database does not have complete control.</li></ol><h4><strong>HOW TO ANSWER BUSINESS CASE QUESTIONS USING SQL SYNTAX</strong></h4><p>In this section, we are going to answer some business questions in a flash using the basic SQL function.</p><p>While your stakeholders will be concentrated on the tables that you have already extracted, it is important to note that keeping a clean documentation of the syntax and the business case/situation used would be a nice reference for them and a good habit for you as a data analyst. A well-maintained documentation will be useful in the future if you need to make modifications or revisit the procedure. It will also serve as a fantastic reference for your colleague if they need to take over the project in the future.</p><p>So, for this analysis, I will be using the Global Stores Data which contains three (3)tables namely; The peoples table, Orders table and the Returns table.</p><p>underneath each business case question, will be a query that will return a result that will answer the business question when run in any database software.</p><p><em>Case question: How do we get all the Customer’s Order details with row id 40155</em></p><pre>SELECT * <br>FROM orders<br>WHERE row_id = 40155</pre><p><em>Case question : Get the Customer’s name and order details of our clients from the order’s table. Sort and filter these details by their names.</em></p><pre>SELECT order_id, Customer _id, customer_name, <br>FROM orders<br>ORDER BY customer_name;</pre><p><em>Case Question: Obtain the address of our customer’s in the African continent.</em></p><pre><br>SELECT customer_name,customer_id, city, state<br>FROM orders<br>WHERE region = &#39;Africa&#39;</pre><p><em>case question :Get Sales Revenue of each customers, filter by Customer’s name in Ascending</em></p><pre><br>SELECT customer_name, sales, quantity, (sales * quantity) AS   sales_revenue<br>FROM orders<br>ORDER BY customer_name</pre><p><em>Case Question: What are the Unique list continent where each order were made by our clients</em></p><pre><br>SELECT DISTINCT market<br>FROM orders;</pre><p><em>Case Question: Get the first five customers with their city ,state and order date, whose profit was greater than 1,000.</em></p><pre>SELECT customer_name, city, state, profit, order_date<br>FROM orders<br>WHERE profit &gt; 1000 <br>LIMIT 5</pre><p><em>Case Question: From the returns table, get the Order_ids where market is not in EU , and goods were returned .</em></p><pre><br>SELECT *<br>FROM returns<br>WHERE market &lt;&gt; ‘EU’ AND returned &lt;&gt; ‘no’</pre><p><em>Case Question: What are the Customer’s order details that has either a shipping mode of ‘Standard class’ or ‘Corporate’ in the segment section.</em></p><pre><br>SELECT *<br>FROM orders<br>WHERE ship_mode = ‘Standard Class’ OR segment = ‘Corporate’</pre><p><em>Case Question: Select the order’s details with either a shipping mode of ‘Standard class’ or ‘Corporate’ in its segment section and must be from Australia.</em></p><pre><br>SELECT *<br>FROM orders<br>WHERE ship_mode = ‘Standard Class’ OR (segment = ‘Corporate’ AND country = ‘Australia’)</pre><p><em>Case Question: Which Customer had a sales greater than 2000 in the Technology category .</em></p><pre><br>SELECT customer_id, customer_name, sales<br>FROM orders<br>WHERE category = ‘Technology’ AND sales &gt; 2000 ;</pre><p><em>Case Question: Get the name of the customer’s orders that does not have postal code.</em></p><pre><br>SELECT customer_id, customer_name, postal_code<br>FROM orders<br>WHERE postal_code ISNULL;</pre><p><em>Case Question:Get the customer’s orders that has postal code and sort by their ship date</em></p><pre><br>SELECT customer_id, customer_name, postal_code, ship_date<br>FROM orders<br>WHERE postal_code IS NOT NULL<br>ORDER BY ship_date DESC;</pre><p><em>Case Question: What is the Customer name , Id , the number of sales of each order from the people’s and orders table.</em></p><pre><br>SELECT customer_name, customer_id, sales<br>FROM people<br>JOIN orders<br> ON people.region = orders.region</pre><p><em>Case Question: Get the customer order details that had their goods returned and the city the order was made</em></p><pre><br>SELECT customer_name, orders.order_id, city, returned<br>FROM orders<br>JOIN returns<br> ON orders.order_id =returns.order_id<br>WHERE returned &lt;&gt; ‘no’;</pre><p><em>Case Question: select the market where orders were mostly returned.</em></p><pre><br>SELECT Customer_id, customer_name, R.market, returned<br>FROM orders AS O<br>JOIN returns AS R<br> ON O.market = R. Market;</pre><p><em>Case Question: Get the day the order date and the ship date of each product, sort using the customer’s name in descending order.</em></p><pre><br>SELECT D.customer_name, D.product_name, D.order_date , O.ship_date<br>FROM orders AS O<br>JOIN orders AS D<br> ON O.order_date = D.ship_date<br>ORDER BY customer_name DESC;</pre><p><em>Case Question: Get the Customer name, ID, market and postal code of the returned product.</em></p><pre> <br>SELECT Customer_id, customer_name, R.market, returned, postal_code<br>FROM orders AS O<br>LEFT returns AS R<br> ON O.market = R. Market;</pre><p><em>Case question: create a new column and grade the sales in 3 categories namely; under sales, mid sales and premium.</em></p><pre> <br>SELECT DISTINCT customer_name, customer_id, sales, ‘Undersales’ AS type<br>FROM orders<br>WHERE sales &lt; 1000 <br>UNION <br> SELECT DISTINCT customer_name, customer_id, sales ,’Midsales’ AS type<br> FROM orders<br> WHERE sales BETWEEN 1000 and 4000<br> UNION<br> SELECT DISTINCT customer_name, customer_id, sales, ‘Premium’ AS type<br> FROM orders<br> WHERE sales &gt;4000<br> ORDER BY customer_name;</pre><p>The End.</p><p>If you enjoyed reading this article and you have any questions, feel free to contact me on <a href="https://twitter.com/gennygennychi?t=gvIlENRPIdOcyb2hbToNEQ&amp;s=09">Twitter</a> or <a href="https://www.linkedin.com/in/chinaza-ogazi-23923317a">LinkedIn</a>.</p><p>I’d love to hear from you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddb45372b2b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>