TAILIEUCHUNG - SAS 9.1 SQL Procedure- P2

Tham khảo tài liệu 'sas sql procedure- p2', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 46 Grouping by One Column A Chapter 2 Grouping by One Column The following example sums the populations of all countries to find the total population of each continent proc sql title Total Populations of World Continents select Continent sum Population format comma14. as TotalPopulation from where Continent is not missing group by Continent Note Countries for which a continent is not listed are excluded by the WHERE clause. A Output Grouping by One Column Total Populations of World Continents Total Continent Population Africa Asia Australia Central America and Caribbean Europe North America Oceania South America 7-- --9---2 3 381 858 879 18 255 944 66 815 930 872 192 202 384 801 818 5 342 368 317 568 801 Grouping without Summarizing When you use a GROUP BY clause without an aggregate function PROC SQL treats the GROUP BY clause as if it were an ORDER BY clause and displays a message in the log that informs you that this has happened. The following example attempts to group high and low temperature information for each city in the table by country proc sql outobs 12 title High and Low Temperatures select City Country AvgHigh AvgLow from group by Country The output and log show that PROC SQL transforms the GROUP BY clause into an ORDER BY clause. Please purchase PDF Split-Merge on to remove this watermark. Retrieving Data from a Single Table A Grouping by Multiple Columns 47 Output Grouping without Aggregate Functions High and Low Temperatures City Country AvgHigh AvgLow Algiers Algeria 90 45 Buenos Aires Argentina 87 48 Sydney Australia 79 44 Vienna Austria 76 28 Nassau Bahamas 88 65 Hamilton Bermuda 85 59 Sao Paulo Brazil 81 53 Rio de Janeiro Brazil 85 64 Quebec Canada 76 5 Montreal Canada 77 8 Toronto Canada 80 17 Beijing China 86 17 Output Grouping without Aggregate Functions Partial Log WARNING A GROUP BY clause has been transformed into an ORDER BY clause because neither the SELECT .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.