Skip to content
Advertisement

Tag: pgadmin

How to display only results matching a certain condition in SQL?

I would appreciate your help very much as Iā€™m still at beginner level in SQL. Thank you šŸ™‚ I have tables representing counties, vendors and their respective sales of stationery products. I have to display only the counties where the sum of all sales exceeds 100 without counting vendor 2 (Randall). For these counties I need county name, vendor name

How to get columns which are not in GROUP BY?

I have a Postgresql database where I have these two tables. shipping_method shipping_details: id shipping_method_id estimated_time_min estimated_time_max price 2 1 02:00:00 04:00:00 230 3 2 00:03:00 01:00:00 500 4 1 02:00:00 04:00:00 1230 5 1 02:00:00 04:00:00 850 6 2 01:00:00 02:00:00 1785 My goal is to fetch the most expensive shipping details per shipping method (for a specific product

how can I can running status from my table?

I have a below table which has multiple rows with same executionid and different status. How can I get the row which status is running, rows will be exclude if executionid associated with both running and completed status? Below image is the sample data : Expected result should be: Answer Using String_AGG() to get all the status per execution id

ppgsql declaring variable from parameter

I am running a sql query from the command line where I pass in value called tablename: I then set the variable like this: And then I have a function where I want to use the variable tablename like this: I have also tried declaring the variable with a few variations of this: Please let me know if you have

How to visualize database tables in postgresql using pgAdmin?

I am trying to visualize tables and their relations using pgAdmin. I have understood that there is a query visualizer tool available for pgAdmin. However, that only is useful if you are dealing with queries. My main goal is to generate a graphical representation of all the tables available in database. Answer I have found this webpage on postgresql wiki,

Advertisement