Difference between revisions of "Select"

From wikieduonline
Jump to navigation Jump to search
Line 27: Line 27:
 
[[jq]]:
 
[[jq]]:
 
* <code>[[jq]] '.[] | [[select]](.color=="blue")' your_json_file.json</code>
 
* <code>[[jq]] '.[] | [[select]](.color=="blue")' your_json_file.json</code>
 +
* <code>cat file.txt | jq '.Quotas[] | select(.QuotaName | contains("G and VT")) | {QuotaName, Value, QuotaArn, QuotaCode, Unit}'</code>
  
  

Revision as of 14:20, 22 May 2024

select 
select count
select distinct


PostgreSQL:


SELECT * FROM your_table_name;
ERROR: permission denied for table your_table_name




jq:

  • jq '.[] | select(.color=="blue")' your_json_file.json
  • cat file.txt | jq '.Quotas[] | select(.QuotaName | contains("G and VT")) | {QuotaName, Value, QuotaArn, QuotaCode, Unit}'


Related terms

See also

Advertising: