{"id":4758,"date":"2023-09-06T05:06:17","date_gmt":"2023-09-06T05:06:17","guid":{"rendered":"https:\/\/www.pickl.ai\/blog\/?p=4758"},"modified":"2025-04-09T06:23:43","modified_gmt":"2025-04-09T06:23:43","slug":"overview-of-row_number-function-in-sql","status":"publish","type":"post","link":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/","title":{"rendered":"Overview of ROW_NUMBER Function in SQL with Easy Examples"},"content":{"rendered":"\n<p><strong>Summary:<\/strong> The ROW_NUMBER function in SQL assigns a unique number to each row, helping sort, rank, and remove duplicates. This blog explains its syntax, practical use cases, and how to combine it with PARTITION BY and ORDER BY for powerful data handling. It is ideal for data science beginners.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#What_is_the_ROW_NUMBER_Function\" >What is the ROW_NUMBER Function?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Syntax_of_ROW_NUMBER\" >Syntax of ROW_NUMBER<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#How_is_it_Different_from_RANK_and_DENSE_RANK\" >How is it Different from RANK and DENSE_RANK?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#How_ROW_NUMBER_Works_with_PARTITION_BY\" >How ROW_NUMBER Works with PARTITION BY<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#What_is_PARTITION_BY\" >What is PARTITION BY?<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Example_Ranking_students_within_each_class\" >Example: Ranking students within each class<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Why_is_it_Useful\" >Why is it Useful?<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Example_Removing_duplicate_emails\" >Example: Removing duplicate emails<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Using_ORDER_BY_with_ROW_NUMBER\" >Using ORDER BY with ROW_NUMBER<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Why_ORDER_BY_Matters\" >Why ORDER BY Matters<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Example_with_Ascending_Order\" >Example with Ascending Order<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Example_with_Descending_Order\" >Example with Descending Order<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Practical_Examples_in_Different_Scenarios\" >Practical Examples in Different Scenarios<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Removing_Duplicates_from_a_Dataset\" >Removing Duplicates from a Dataset<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Fetching_Top-N_Records_per_Group\" >Fetching Top-N Records per Group<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Pagination_Using_ROW_NUMBER\" >Pagination Using ROW_NUMBER<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Bringing_It_Full_Circle\" >Bringing It Full Circle<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#What_does_the_ROW_NUMBER_function_do_in_SQL\" >What does the ROW_NUMBER function do in SQL?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#How_is_ROW_NUMBER_different_from_RANK_in_SQL\" >How is ROW_NUMBER different from RANK in SQL?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#Can_ROW_NUMBER_be_used_to_remove_duplicates_in_SQL\" >Can ROW_NUMBER be used to remove duplicates in SQL?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 id=\"introduction\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span><strong>Introduction<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Ever wondered how <a href=\"https:\/\/pickl.ai\/blog\/introduction-to-sql-for-data-science\/\">SQL<\/a> keeps track of rows like a pro? Welcome to the Overview of ROW_NUMBER Function in SQL\u2014your fun little guide to understanding one of <a href=\"https:\/\/blog.bismart.com\/en\/10-sql-tricks-you-should-know\" rel=\"nofollow\">SQL\u2019s coolest tricks<\/a>!&nbsp;<\/p>\n\n\n\n<p>In this blog, I\u2019ll walk you through what the ROW_NUMBER function does and show you why it\u2019s super useful when working with data. Whether you&#8217;re trying to rank, sort, or pick out specific rows, this function has your back.&nbsp;<\/p>\n\n\n\n<p>By the end, you\u2019ll know exactly how and when to use it\u2014even if you&#8217;ve never written a single line of SQL before!<\/p>\n\n\n\n<p><strong>Key Takeaways<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ROW_NUMBER assigns a unique number to each row, starting at 1.<\/li>\n\n\n\n<li>Use PARTITION BY to reset row numbering within groups.<\/li>\n\n\n\n<li>Combine with ORDER BY to define row ranking order.<\/li>\n\n\n\n<li>Ideal for removing duplicates, ranking, and pagination tasks.<\/li>\n\n\n\n<li>Frequently used in data science and analytics workflows.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"what-is-the-row_number-function\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_the_ROW_NUMBER_Function\"><\/span><strong>What is the ROW_NUMBER Function?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The <strong>ROW_NUMBER<\/strong> function in SQL assigns a <strong>unique number to each row<\/strong> in a result set. This number starts at <strong>1<\/strong> and increases as you move down the rows. This function helps when you want to sort your data and keep track of the row positions.<\/p>\n\n\n\n<h3 id=\"syntax-of-row_number\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Syntax_of_ROW_NUMBER\"><\/span><strong>Syntax of ROW_NUMBER<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Here\u2019s how you write it:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXc4lINBsVu9FWEopqqc12ervwXTxRPBxDg-48ddb15zMVOAkvWdroLzHbLNY5puJp4GCYI0uf3COjjQzm97XcmpN5v_tMq0rkr9WgnfJ3QvsJXtsE7exTbKEW5GDMmEjugxnGFC8g?key=uxKy-KDiK_P1FhpE8epuLg\" alt=\"SQL syntax for using the ROW_NUMBER function\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ROW_NUMBER() is the function.<\/li>\n\n\n\n<li>OVER tells SQL to apply the function across the rows.<\/li>\n\n\n\n<li>ORDER BY decides how the numbering is done, based on which column and in what order.<\/li>\n<\/ul>\n\n\n\n<h3 id=\"how-is-it-different-from-rank-and-dense_rank\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_is_it_Different_from_RANK_and_DENSE_RANK\"><\/span><strong>How is it Different from RANK and DENSE_RANK?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Although all three functions <strong>add numbers to rows<\/strong>, they behave differently when there are <strong>duplicate values<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ROW_NUMBER<\/strong> gives a <strong>unique number to each row<\/strong>, even if the values are the same.<br><strong>RANK<\/strong> gives the <strong>same rank to tied rows<\/strong>, but it <strong>jumps numbers<\/strong> afterward.<\/li>\n\n\n\n<li><strong>DENSE_RANK<\/strong> also gives the <strong>same rank to tied rows<\/strong> but <strong>does not skip any numbers<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>So, if you want a clean list where every row has a different number, <strong>ROW_NUMBER<\/strong> is the best choice.<\/p>\n\n\n\n<h2 id=\"how-row_number-works-with-partition-by\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_ROW_NUMBER_Works_with_PARTITION_BY\"><\/span><strong>How ROW_NUMBER Works with PARTITION BY<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The ROW_NUMBER() function becomes more powerful when used with the PARTITION BY clause. It allows us to restart the row numbering for each group of rows. This is helpful when you want to organise <a href=\"https:\/\/pickl.ai\/blog\/difference-between-data-and-information\/\">data<\/a> into smaller groups and assign row numbers starting from 1 within each group.<\/p>\n\n\n\n<p>Let\u2019s break this down so anyone can understand.<\/p>\n\n\n\n<h3 id=\"what-is-partition-by\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_PARTITION_BY\"><\/span><strong>What is PARTITION BY?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Think of PARTITION BY as a way to group your data before numbering it. Imagine you have a table of students from different classes and want to assign a rank to each student based on their marks \u2014 <strong>within their own class<\/strong>.<\/p>\n\n\n\n<p>Using PARTITION BY class, you tell SQL to start counting row numbers from 1 <strong>for each class<\/strong> separately. Without PARTITION BY, SQL will number all the rows as one big group, regardless of the class.<\/p>\n\n\n\n<h4 id=\"example-ranking-students-within-each-class\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_Ranking_students_within_each_class\"><\/span><strong>Example: Ranking students within each class<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfSSulvyr12vGwrDubRaJhiHKqzGIIIp44loTqr1KF8HwTzLyEd5-m6BfdUtoF8vMTMBFNVbhH6ZW6W8rrTaXC0ahfCs6oeFTgcEYWGfY52EvWIFraMwqSzxXFEjZt_VTUytfj6oA?key=uxKy-KDiK_P1FhpE8epuLg\" alt=\"Image showing Example of Ranking students within each class\"\/><\/figure>\n\n\n\n<h3 id=\"why-is-it-useful\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_is_it_Useful\"><\/span><strong>Why is it Useful?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Here are some real-world situations where PARTITION BY becomes useful:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ranking Within Groups: <\/strong>Suppose you&#8217;re working with a sales report and want to find the top salesperson in each region. By using PARTITION BY region, SQL will rank salespeople separately for each region.<\/li>\n\n\n\n<li><strong>Filtering Duplicate Records: <\/strong>If your data contains duplicates, use ROW_NUMBER() with PARTITION BY on repeated values (like email or user ID) to identify and remove extra copies while keeping only the first one.<\/li>\n\n\n\n<li><strong>Pagination by Category: <\/strong>When you want to show a limited number of items per category on a webpage, PARTITION BY helps you list the first few rows from each category.<\/li>\n<\/ul>\n\n\n\n<h4 id=\"example-removing-duplicate-emails\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_Removing_duplicate_emails\"><\/span><strong>Example: Removing duplicate emails<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdxZ1G8EqfVjrLtAw3LYi9C4i6xcPXDGb51Jo6By-apSUT3yqDWH_QnG2ijAnYiEu0qgl0s3X-2TQNw0ZVXMrf24z5vonwQykNo2XRmaBrEc9TZLANkQy5ux0LvHmbLLntGReSS?key=uxKy-KDiK_P1FhpE8epuLg\" alt=\"Delete duplicate email entries\"\/><\/figure>\n\n\n\n<h2 id=\"using-order-by-with-row_number\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Using_ORDER_BY_with_ROW_NUMBER\"><\/span><strong>Using ORDER BY with ROW_NUMBER<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The ORDER BY clause plays a vital role when you use the ROW_NUMBER() function in SQL. It tells SQL how to arrange your data before assigning row numbers. Without ORDER BY, SQL won&#8217;t know which row should be numbered first, second, third, etc. So, if you want your row numbers to make sense, you must use ORDER BY correctly.<\/p>\n\n\n\n<h3 id=\"why-order-by-matters\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_ORDER_BY_Matters\"><\/span><strong>Why ORDER BY Matters<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Think of a list of names. If you want to give each name a number based on who comes first alphabetically, you\u2019ll need to sort the list first. Similarly, the ORDER BY clause sorts the data in SQL before assigning row numbers.<\/p>\n\n\n\n<p>Let\u2019s say you have a table of students with their marks. If you want to assign row numbers starting from the student with the highest marks, you would use ORDER BY marks DESC. This way, the top scorer gets row number 1.<\/p>\n\n\n\n<p>If you skip ORDER BY, SQL might assign row numbers randomly, and your results won\u2019t be helpful.<\/p>\n\n\n\n<h3 id=\"example-with-ascending-order\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_with_Ascending_Order\"><\/span><strong>Example with Ascending Order<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Here\u2019s a simple example:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXddFeuaoBtnH-AMT7X1eRqBLyipFx0dn2al4jR90gYa7JOGGqJvi82348BaYnC61uzl5GiFOMgzX1VpUUHHyQL1vyUj_KPXt-fyMc_iMWfzWC7vA1FumzQz0rvNeAmk3SPvv39EBg?key=uxKy-KDiK_P1FhpE8epuLg\" alt=\"Row numbers by ascending student marks\"\/><\/figure>\n\n\n\n<p>In this case, students with the <strong>lowest marks<\/strong> get row number 1, which increases as marks increase.<\/p>\n\n\n\n<h3 id=\"example-with-descending-order\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_with_Descending_Order\"><\/span><strong>Example with Descending Order<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Now, let\u2019s sort from highest to lowest:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXft93528Hn-t-_2pJUspJDldwfhfya5QJIOwsEAIMPMVm-QMSXByeoAH3PCIjNadTuaPEScys3X-Ov7qfJI5JwZ_DwYCv_YHLtVRttWRMtqLW1tKhLz6Gr2lYhFfmnTl8WJlsMnaw?key=uxKy-KDiK_P1FhpE8epuLg\" alt=\"Row numbers by descending student marks\"\/><\/figure>\n\n\n\n<p>Now, the student with the <strong>highest marks<\/strong> gets row number 1.<\/p>\n\n\n\n<h2 id=\"practical-examples-in-different-scenarios\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Practical_Examples_in_Different_Scenarios\"><\/span><strong>Practical Examples in Different Scenarios<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The <strong>ROW_NUMBER<\/strong> function in SQL is not just a fancy feature\u2014it helps solve real problems smartly and simply. Here are three practical situations where this function comes in handy. These examples will help you understand how and why you might use it in everyday data tasks, even if you&#8217;re not a tech expert.<\/p>\n\n\n\n<h3 id=\"removing-duplicates-from-a-dataset\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Removing_Duplicates_from_a_Dataset\"><\/span><strong>Removing Duplicates from a Dataset<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Imagine you have a table that accidentally has the same entry more than once. For example, a customer named &#8220;John Smith&#8221; might appear with the same email ID three times. You can use <strong>ROW_NUMBER<\/strong> to give a unique number to each row that looks the same. Then, you keep the first one and delete the rest.<\/p>\n\n\n\n<p>Here\u2019s how it works:<br>SQL will assign a number like 1, 2, 3 to the duplicate rows. You keep the row with number 1 and remove the others. It&#8217;s like sorting your papers and keeping just one copy of each.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdlfWI8YYAG72uQnjVU7c_G9g_H3KQLzr4R-icE0BfWKrouXjmkyausFyPqwNTEpnrKLAIKO6_fCxIH-EPeOcuhnWQscqVShCsDgiDXnIw_00Aa1UKODZ2ORl6sP7jv1oohSBVGJw?key=uxKy-KDiK_P1FhpE8epuLg\" alt=\"Delete duplicate rows using ROW_NUMBER\"\/><\/figure>\n\n\n\n<h3 id=\"fetching-top-n-records-per-group\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Fetching_Top-N_Records_per_Group\"><\/span><strong>Fetching Top-N Records per Group<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Let\u2019s say you run a bookstore and want to see the best-selling book in each category, like Fiction, Science, and History. Using <strong>ROW_NUMBER<\/strong>, you can group the books by category and assign a number based on how many copies were sold. Then, you just pick the one with <strong>ROW_NUMBER = 1<\/strong> from each group.<\/p>\n\n\n\n<p>It\u2019s a quick way to find \u201cthe top one\u201d in every group without sorting the whole table.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfBItVfSDodir5BIw-zGgm-ZBI4ozc9BYHw9LPtCJYZ_xzXV7QifDebxfkV8lJeNs00OJsJh8O3vtuey7yf_6YshS8oJaZvhaeKYntxp5oXAVPncpgGe_RBQ4Xb3oPg0hfVkq-L?key=uxKy-KDiK_P1FhpE8epuLg\" alt=\"Get top-selling book in each category\"\/><\/figure>\n\n\n\n<h3 id=\"pagination-using-row_number\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pagination_Using_ROW_NUMBER\"><\/span><strong>Pagination Using ROW_NUMBER<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Websites often show data in pages\u2014like 10 results at a time. If your table has 1,000 rows, you don\u2019t want to show everything at once. <strong>ROW_NUMBER<\/strong> helps break data into smaller pages by assigning numbers to each row. Then, you display only the rows that match the current page (like 11 to 20 for page 2).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdK84V2FjVTFQ8JdD1VVtPctCL_VpsVttiAp_l9vRcrD0xfGxaA_5v89TR76UmjbS52Z9ASHTrO6P5gycTgY_JKH2lclcYvlyhLL83KTJkvI6mjTl9eLvrl2KY__ZdDh9WV-YFddQ?key=uxKy-KDiK_P1FhpE8epuLg\" alt=\"Paginate results from row 11 to 20\"\/><\/figure>\n\n\n\n<h2 id=\"bringing-it-full-circle\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Bringing_It_Full_Circle\"><\/span><strong>Bringing It Full Circle<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Mastering the ROW_NUMBER function gives you greater control over your SQL queries\u2014whether you&#8217;re cleaning duplicates, ranking data, or implementing pagination. This function is handy in real-world data science tasks where clean and organised datasets are crucial for analysis.&nbsp;<\/p>\n\n\n\n<p>If you&#8217;re stepping into the world of data or want to sharpen your SQL skills, start exploring data science courses by <a href=\"http:\/\/pickl.ai\">Pickl.AI<\/a>. Learn from industry experts, work on real datasets, and get hands-on with tools like SQL, Python, and more.&nbsp;<\/p>\n\n\n\n<p>A strong grip on SQL functions like ROW_NUMBER can set the foundation for successful data-driven decision-making.<\/p>\n\n\n\n<h2 id=\"frequently-asked-questions\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span><strong>Frequently Asked Questions<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 id=\"what-does-the-row_number-function-do-in-sql\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_does_the_ROW_NUMBER_function_do_in_SQL\"><\/span><strong>What does the ROW_NUMBER function do in SQL?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The ROW_NUMBER function assigns a unique sequential number to each row in a result set. It\u2019s useful for sorting, ranking, and pagination, especially when combined with PARTITION BY and ORDER BY. It helps data analysts structure data more efficiently for analysis and reporting.<\/p>\n\n\n\n<h3 id=\"how-is-row_number-different-from-rank-in-sql\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_is_ROW_NUMBER_different_from_RANK_in_SQL\"><\/span><strong>How is ROW_NUMBER different from RANK in SQL?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>While both functions assign numbers to rows, ROW_NUMBER gives each row a unique number\u2014even for duplicates. In contrast, RANK assigns the same rank to tied rows but skips the next rank(s). Choose ROW_NUMBER when you want a distinct sequence without gaps.<\/p>\n\n\n\n<h3 id=\"can-row_number-be-used-to-remove-duplicates-in-sql\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Can_ROW_NUMBER_be_used_to_remove_duplicates_in_SQL\"><\/span><strong>Can ROW_NUMBER be used to remove duplicates in SQL?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Yes, ROW_NUMBER is commonly used to remove duplicate records. You can assign row numbers to grouped data using PARTITION BY, then filter out rows where the row number is greater than 1. This helps retain only the first occurrence of each duplicate entry.<\/p>\n","protected":false},"excerpt":{"rendered":"Learn how the ROW_NUMBER function in SQL simplifies ranking, pagination, and data cleanup with examples.\n","protected":false},"author":19,"featured_media":21172,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[613],"tags":[1646,1647,1645,1644,1648,2199,2684],"ppma_author":[2186,2185],"class_list":{"0":"post-4758","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-sql","8":"tag-difference-between-rank-and-dense_rank-and-row_number-in-sql","9":"tag-examples-of-row_number-function","10":"tag-how-to-use-rownum-in-sql","11":"tag-row-number-function-in-sql","12":"tag-row-number-function-in-sql-with-example","13":"tag-sql","14":"tag-sql-row-number"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.3 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>ROW_NUMBER Function in SQL: Explained for Beginners<\/title>\n<meta name=\"description\" content=\"Explore the Overview of ROW_NUMBER Function in SQL. Learn how it ranks, filters, and organises data with real-world examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Overview of ROW_NUMBER Function in SQL with Easy Examples\" \/>\n<meta property=\"og:description\" content=\"Explore the Overview of ROW_NUMBER Function in SQL. Learn how it ranks, filters, and organises data with real-world examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/\" \/>\n<meta property=\"og:site_name\" content=\"Pickl.AI\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-06T05:06:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-09T06:23:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Versha Rawat, Ajay Goyal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Versha Rawat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/\"},\"author\":{\"name\":\"Versha Rawat\",\"@id\":\"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/0310c70c058fe2f3308f9210dc2af44c\"},\"headline\":\"Overview of ROW_NUMBER Function in SQL with Easy Examples\",\"datePublished\":\"2023-09-06T05:06:17+00:00\",\"dateModified\":\"2025-04-09T06:23:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/\"},\"wordCount\":1447,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png\",\"keywords\":[\"difference between rank and dense_rank and row_number in sql\",\"Examples of ROW_NUMBER Function\",\"how to use rownum in sql\",\"row number function in sql\",\"row number function in sql with example\",\"SQL\",\"SQL Row Number\"],\"articleSection\":[\"SQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/\",\"url\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/\",\"name\":\"ROW_NUMBER Function in SQL: Explained for Beginners\",\"isPartOf\":{\"@id\":\"https:\/\/www.pickl.ai\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png\",\"datePublished\":\"2023-09-06T05:06:17+00:00\",\"dateModified\":\"2025-04-09T06:23:43+00:00\",\"author\":{\"@id\":\"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/0310c70c058fe2f3308f9210dc2af44c\"},\"description\":\"Explore the Overview of ROW_NUMBER Function in SQL. Learn how it ranks, filters, and organises data with real-world examples.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#primaryimage\",\"url\":\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png\",\"contentUrl\":\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png\",\"width\":800,\"height\":500,\"caption\":\"Overview of ROW_NUMBER function in SQL with easy examples.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pickl.ai\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL\",\"item\":\"https:\/\/www.pickl.ai\/blog\/category\/sql\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Overview of ROW_NUMBER Function in SQL with Easy Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pickl.ai\/blog\/#website\",\"url\":\"https:\/\/www.pickl.ai\/blog\/\",\"name\":\"Pickl.AI\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pickl.ai\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/0310c70c058fe2f3308f9210dc2af44c\",\"name\":\"Versha Rawat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/image\/c89aa37d48a23416a20dee319ca50fbb\",\"url\":\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/12\/avatar_user_19_1703676847-96x96.jpeg\",\"contentUrl\":\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/12\/avatar_user_19_1703676847-96x96.jpeg\",\"caption\":\"Versha Rawat\"},\"description\":\"I'm Versha Rawat, and I work as a Content Writer. I enjoy watching anime, movies, reading, and painting in my free time. I'm a curious person who loves learning new things.\",\"url\":\"https:\/\/www.pickl.ai\/blog\/author\/versha-rawat\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"ROW_NUMBER Function in SQL: Explained for Beginners","description":"Explore the Overview of ROW_NUMBER Function in SQL. Learn how it ranks, filters, and organises data with real-world examples.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/","og_locale":"en_US","og_type":"article","og_title":"Overview of ROW_NUMBER Function in SQL with Easy Examples","og_description":"Explore the Overview of ROW_NUMBER Function in SQL. Learn how it ranks, filters, and organises data with real-world examples.","og_url":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/","og_site_name":"Pickl.AI","article_published_time":"2023-09-06T05:06:17+00:00","article_modified_time":"2025-04-09T06:23:43+00:00","og_image":[{"width":800,"height":500,"url":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png","type":"image\/png"}],"author":"Versha Rawat, Ajay Goyal","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Versha Rawat","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#article","isPartOf":{"@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/"},"author":{"name":"Versha Rawat","@id":"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/0310c70c058fe2f3308f9210dc2af44c"},"headline":"Overview of ROW_NUMBER Function in SQL with Easy Examples","datePublished":"2023-09-06T05:06:17+00:00","dateModified":"2025-04-09T06:23:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/"},"wordCount":1447,"commentCount":0,"image":{"@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png","keywords":["difference between rank and dense_rank and row_number in sql","Examples of ROW_NUMBER Function","how to use rownum in sql","row number function in sql","row number function in sql with example","SQL","SQL Row Number"],"articleSection":["SQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/","url":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/","name":"ROW_NUMBER Function in SQL: Explained for Beginners","isPartOf":{"@id":"https:\/\/www.pickl.ai\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#primaryimage"},"image":{"@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png","datePublished":"2023-09-06T05:06:17+00:00","dateModified":"2025-04-09T06:23:43+00:00","author":{"@id":"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/0310c70c058fe2f3308f9210dc2af44c"},"description":"Explore the Overview of ROW_NUMBER Function in SQL. Learn how it ranks, filters, and organises data with real-world examples.","breadcrumb":{"@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#primaryimage","url":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png","contentUrl":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png","width":800,"height":500,"caption":"Overview of ROW_NUMBER function in SQL with easy examples."},{"@type":"BreadcrumbList","@id":"https:\/\/www.pickl.ai\/blog\/overview-of-row_number-function-in-sql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pickl.ai\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL","item":"https:\/\/www.pickl.ai\/blog\/category\/sql\/"},{"@type":"ListItem","position":3,"name":"Overview of ROW_NUMBER Function in SQL with Easy Examples"}]},{"@type":"WebSite","@id":"https:\/\/www.pickl.ai\/blog\/#website","url":"https:\/\/www.pickl.ai\/blog\/","name":"Pickl.AI","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pickl.ai\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/0310c70c058fe2f3308f9210dc2af44c","name":"Versha Rawat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/image\/c89aa37d48a23416a20dee319ca50fbb","url":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/12\/avatar_user_19_1703676847-96x96.jpeg","contentUrl":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/12\/avatar_user_19_1703676847-96x96.jpeg","caption":"Versha Rawat"},"description":"I'm Versha Rawat, and I work as a Content Writer. I enjoy watching anime, movies, reading, and painting in my free time. I'm a curious person who loves learning new things.","url":"https:\/\/www.pickl.ai\/blog\/author\/versha-rawat\/"}]}},"jetpack_featured_media_url":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/image7.png","authors":[{"term_id":2186,"user_id":19,"is_guest":0,"slug":"versha-rawat","display_name":"Versha Rawat","avatar_url":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/12\/avatar_user_19_1703676847-96x96.jpeg","first_name":"Versha","user_url":"","last_name":"Rawat","description":"I'm Versha Rawat, and I work as a Content Writer. I enjoy watching anime, movies, reading, and painting in my free time. I'm a curious person who loves learning new things."},{"term_id":2185,"user_id":16,"is_guest":0,"slug":"ajaygoyal","display_name":"Ajay Goyal","avatar_url":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_16_1695814138-96x96.png","first_name":"Ajay","user_url":"","last_name":"Goyal","description":"I am Ajay Goyal, a civil engineering background with a passion for data analysis. I've transitioned from designing infrastructure to decoding data, merging my engineering problem-solving skills with data-driven insights. I am currently working as a Data Analyst in TransOrg. Through my blog, I share my journey and experiences of data analysis."}],"_links":{"self":[{"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/posts\/4758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/comments?post=4758"}],"version-history":[{"count":3,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/posts\/4758\/revisions"}],"predecessor-version":[{"id":21173,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/posts\/4758\/revisions\/21173"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/media\/21172"}],"wp:attachment":[{"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/media?parent=4758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/categories?post=4758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/tags?post=4758"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/ppma_author?post=4758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}