Where can I get best resources to learn sql?
SQL is a declarative data query language. PostgreSQL is a database which supports SQL (as do all RDBMS's). Oracle supports SQL, so does MySQL &amp;c. There are differences - PostgreSQL is very ANSI compliant, whereas Oracle and MySQL not so much.  

If you want to learn, Google SQL tutorials and maybe use dbfiddle.uk (more servers) or db-fiddle.com (a bit easier) to test - or just download PostgreSQL/MySQL/Firebird. The three of these are Open Source and free to use for any purpose, bar MySQL: you can't distribute a closed-source application using MySQL without paying a licence fee to Oracle because of the dual GPL/commercial licencing.

From here:


  
  MySQL Commercial License for OEMs, ISVs and VARs Oracle provides its MySQL database server and MySQL Client Libraries under a dual
  license model designed to meet the development and distribution needs
  of both commercial distributors (such as OEMs, ISVs and VARs) and open
  source projects.
  


What this means is that basically, if you want to distribute MySQL based apps without paying a fee, your app must be under the GPL version 2.

You can also download Oracle XE for free (latest version as of 05/2018) is still 11g - limitations from here:


  
  Oracle Database XE can be installed on any size host machine with any
  number of CPUs (one database per machine), but XE will store up to
  11GB of user data, use up to 1GB of memory, and use one CPU on the
  host machine.
  


There's also: 

Microsoft SQL Server Express with limitations 1GB RAM and 10GB data - from here and here.

Your question is very general (too broad) for this forum - you need to read a couple of books/tutorials and come back with specific questions (with what you've tried - use one of the fiddles above for your DDL for your sample data (CREATE TABLE...), DML (INSERT INTO blah VALUES (...);) in your questions.