Start,Stop and check the status of postgresql server
-> After the initilizing the data directory we need to start the server. Default port is 5432. To start the server: Go to the installation directory then give the data directory location then start using the cmd. cmd:/usr/local/pgsql/bin/pg_ctl -D /DB/postgres9.5.8/ start To…
-> After the initilizing the data directory we need to start the server. Default port is 5432.
To start the server:
Go to the installation directory then give the data directory location then start using the cmd.
cmd:/usr/local/pgsql/bin/pg_ctl -D /DB/postgres9.5.8/ start

To check the server status whether its running or not:
cmd:/usr/local/pgsql/bin/pg_ctl -D /DB/postgres9.5.8/ status

To stop the server:
cmd:/usr/local/pgsql/bin/pg_ctl -D /DB/postgres9.5.8/ -m fast stop

-> Now we can connect to the server and create our own database through PGAdmin tool or from the cmd itself.
Write a query that shows each order status and how many orders have it — but only statuses with more than 1 order.