Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

grouping by email domain mysql code example

Example: grouping by email domain mysql

SELECT substring_index(email, '@', -1) domain, COUNT(*) email_count
FROM table
GROUP BY substring_index(email, '@', -1)

-- If you want to sort as well:
ORDER BY email_count DESC, domain;

Tags:

Sql Example

Related

stripe api what is code example required on radio-inline code example 403 Forbidden nginx adding location code example sequelize findall 2 attributes code example anything but.. in regex code example r append to bottom of dataframe code example unity get change animator controller code example html symbol copyright code example remove href css code example import datetime x = datetime.datetime(2020, 5, 17) print(x) code example blazor horizontal navbar code example select object key with entries code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy