I’m new in SQL and need little help to understand parts in this SQL statement
select BUY_VALUE,
SELL_VALUE,
RATE_DAY,
RATE_TIME
from ( SELECT TRIM (b.ticker),
TRIM (TO_CHAR (b.buy_value, '9999999.99')) BUY_VALUE,
TRIM (TO_CHAR (b.sell_value, '9999999.99')) SELL_VALUE,
b.currency,
TO_CHAR (TRUNC (SYSDATE), 'YYYYMMDD') rate_day,
TO_CHAR (SYSDATE, 'HH24MISS') rate_time
FROM portal.gpb_bank_quotes b
WHERE b.ticker = 'GAZP'
)
- what is
b(b.buy_value) ? FROM portal.gpb_bank_quotes– is that table name? Is it possible that it delimited with.- ahhh too difficult ///
Thanks in advance
bis a table alias forportal.gpb_bank_quotes. This is handy so that you don’t have to typeportal.gpb_bank_quotes.buy_value, etc.Yes.
portalis a schema, andgpb_bank_quotesis a table in that schema.