BookmarkSubscribeRSS Feed
kindbe17
Fluorite | Level 6

hello, could you please help me to create tables with SQL?

 

4 REPLIES 4
Patrick
Opal | Level 21

Also your subject indicates that you're actually after for something different here the docu link that should answer your question: Creating and Updating Tables and Views

 

Going forward please spend a bit more time to explain what you've got and what you need. Putting in the time to provide all information from start is highly appreciated in this forum.

PaigeMiller
Diamond | Level 26

@kindbe17 wrote:

hello, could you please help me to create tables with SQL?

 


Vague and un-detailed questions like this get vague and un-detailed answers. Specific and detailed questions get specific and detailed answers. Please be specific and detailed about what you want.

 

Also, what does your question have to do with your title? Seems to me they are talking about different things.

--
Paige Miller
kindbe17
Fluorite | Level 6

I got it, thank you for explaining, i will be more careful

 

need to calculate how many car types are in TYPE variable

i tried to do this

 

 

proc sql;
create table cars_2 as
select Make, Type
from sashelp.cars
Group by make
quit;

Patrick
Opal | Level 21

Here you go.

proc sql;
  create table cars_2 as
    select Make, count(distinct Type) as n_types
      from sashelp.cars
        Group by make
  ;
quit;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 662 views
  • 0 likes
  • 3 in conversation