In this question, you have to write a Python program to print the names of the players and the team of each player of all those players whose jersey number is a prime number.
The list should be ordered in reverse alphabetical order of player names. If two or more players have the same name, then further sorting should be done on the team name, again in reverse alphabetical order.
The format of output is as given below:
Name of the player, followed by a comma (,), then a space and then the team name.
For example, if Arjun has jersey number 5 and is playing for All Stars and Pranav, with jersey number 7, is playing for team Amigos, then the output will be:
Pranav, Amigos
Arjun, All Stars
CREATE TABLE "public"."teams" (
"team_id" varchar(10) NOT NULL,
"name" varchar(80) NOT NULL,
"city" varchar(80) NOT NULL,
"playground" varchar(80) NOT NULL,
"jersey_home_color" varchar(80),
"jersey_away_color" varchar(80),
PRIMARY KEY ("team_id")
);
CREATE TABLE "public"."managers" (
"mgr_id" varchar(10) NOT NULL,
"name" varchar(80) NOT NULL,
"dob" date NOT NULL,
"team_id" varchar(10),
"since" date,
PRIMARY KEY ("mgr_id")
);
CREATE TABLE "public"."matches" (
"match_num" varchar(10) NOT NULL,
"match_date" date NOT NULL,
"host_team_id" varchar(10) NOT NULL,
"guest_team_id" varchar(10) NOT NULL,
"host_team_score" int4 NOT NULL,
"guest_team_score" int4 NOT NULL,
PRIMARY KEY ("match_num")
);
CREATE TABLE "public"."match_referees" (
"match_num" varchar(10) NOT NULL,
"referee" varchar(15),
"assistant_referee_1" varchar(15),
"assistant_referee_2" varchar(15),
"fourth_referee" varchar(15),
PRIMARY KEY ("match_num")
);
CREATE TABLE "public"."referees" (
"referee_id" varchar(10) NOT NULL,
"name" varchar(80) NOT NULL,
"dob" date NOT NULL,
PRIMARY KEY ("referee_id")
);
CREATE TABLE "public"."players" (
"player_id" varchar(10) NOT NULL,
"name" varchar(80) NOT NULL,
"dob" date NOT NULL,
"jersey_no" int4 NOT NULL,
"team_id" varchar(10) NOT NULL,
PRIMARY KEY ("player_id")
);