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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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