Here I need to calculate the difference of the two dates in the PostgreSQL.
PostgreSQL
In SQL Server: Like we do in SQL Server its muc
SQL Server
This is how I usually do it. A simple number of days perspective of B minus A.
DATE_PART('day', MAX(joindate) - MIN(joindate)) as date_diff