I adjusted your query then I tried it and it showed me just one column not all the flights
this is what I tried
SELECT YEAR(plannedDeparture),
MONTH(plannedDeparture),
a.mid,
m.`name`,
COUNT(f.fid) AS `Total...
Hi bro
here is my full schema
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
DROP SCHEMA IF EXISTS `SADB` ;
CREATE SCHEMA IF NOT EXISTS...
This is my schema:
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
DROP SCHEMA IF EXISTS `SADB` ;
CREATE SCHEMA IF NOT EXISTS `SADB`...
Hi
I have 3 tables which are (flight, model, airplane)
Flight: fid, pid, aid, plannedDeparture, actualDeparture, passengerCount, destination
Model: mid, name
Airplane: aid, mid, oid, hid, dateAqu
and I want to get a report to show the total number of flights and the average passenger count for...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.