DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PHP
Laravel How do I get distinct values from the table along with the count of how many rows there are containing that value
Model::query()->groupBy('country_name')->select('counrty_name',DB::raw('COUNT(1)'))->get()
PREVIOUS
NEXT
Tagged:
#Laravel
#How
#I
#distinct
#values
#table
#count
#rows
ADD COMMENT
Topic
COMMENT
Name
6+7 =
Submit