Payment database practice MySQL
create database payment;
use payment;
create table pay
(id int primary key,
name varchar(20),
mode varchar(15),
city varchar(20)
);
insert into pay
(id,name,mode,city)
values
(101,"Olivia","Netb","Portland"),
(102,"Ethan","Cred","Miami"),
(103,"Maya","Cred","Seattle"),
(104,"Liam","Netb","Denver"),
(105,"Sophia","Cred","New Orleans"),
(106,"Celeb","Debt","Minneapolis"),
(107,"Ava","Debt","Phoenix");
select * from pay;
select mode , count(name)
from pay
group by mode;
Comments
Post a Comment