You need to know database design concepts first,then SQL.