Función PostgreSQL-LPAD
LPAD() LPAD(string, length[, fill]) Analicemos la sintaxis anterior: El argumento de la string LPAD() SELECT LPAD(‘GeeksforGeeks’, 15, ‘*’); Ejemplo 2: LPAD() SELECT first_name || ‘ ‘ || last_name fullname, SUM(amount) total, LPAD(‘*’, CAST(TRUNC(SUM(amount) / 10) AS INT), ‘*’) chart FROM payment INNER JOIN customer using (customer_id) GROUP BY customer_id ORDER BY SUM(amount) DESC; Producción: Publicación … Continue reading «Función PostgreSQL-LPAD»