sql stringlengths 6 1.05M |
|---|
<filename>src/test/resources/db/scripts/NoteRepositoryTest.sql
-- Entity 1:
INSERT INTO note(id, party_id, created, created_by, modified, modified_by, subject, body)
VALUES('a2f40fc7-7d70-404b-a294-85e4f7eff55e', 'fbfbd90c-4c47-11ec-81d3-0242ac130003', '2022-01-01 12:14:32.234', 'createdBy1', '2022-01-03 12:14:32.234',... |
<gh_stars>0
/*
For this assignment we are going to assess the security needs of MetroAlt and create a security plan.
First we want to assess who are the users and what the security needs are for the database. This should be a written document.
We will define schema for each of the users types (in 224 we will creat... |
-- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 26-12-2017 a las 20:04:20
-- Versión del servidor: 5.7.20-0ubuntu0.17.04.1
-- Versión de PHP: 7.0.22-0ubuntu0.17.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*... |
-- !migrate up
CREATE TABLE tokens (
id BIGSERIAL PRIMARY KEY,
uuid CHARACTER varying NOT NULL,
user_id BIGINT REFERENCES users (id),
created_at timestamp without time zone,
updated_at timestamp without time zone
);
CREATE UNIQUE INDEX unique_tokens ON tokens(uuid);
-- !migrate down
DROP TABLE tokens;
|
-------------------------------------------------------------------------------
--
-- Script: multiblock_read_test.sql
-- Purpose: find largest actual multiblock read size
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: <NAME>
--
-- Description: This script prompts the user to enter the name of a table to
-- scan, and t... |
-- phpMyAdmin SQL Dump
-- version 4.4.15.9
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 17, 2017 at 03:48 PM
-- Server version: 5.5.50-MariaDB
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
<reponame>DuongVu98/books-sharing-system
insert into book(title, author, amount) values('The Lord of the Rings', '<NAME>', 3);
insert into book(title, author, amount) values('<NAME> and the Death<NAME>', '<NAME>', 7);
insert into book(title, author, amount) values('Chronicles of Narnia', '<NAME>', 7); |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 28, 2020 at 12:13 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
BEGIN;
CREATE OR REPLACE FUNCTION openreplay_version()
RETURNS text AS
$$
SELECT 'v1.4.0'
$$ LANGUAGE sql IMMUTABLE;
CREATE INDEX IF NOT EXISTS user_favorite_sessions_user_id_session_id_idx ON user_favorite_sessions (user_id, session_id);
CREATE INDEX IF NOT EXISTS pages_session_id_timestamp_idx ON events.pages (... |
/* Panel fields not in the project */
SELECT distinct d.PROJECTNAME, C.PNLNAME, C.FIELDNAME FROM
PSPNLFIELD C, PSPROJECTITEM D, PSDBFIELD E
WHERE D.OBJECTTYPE = 5
AND C.PNLNAME = D.OBJECTVALUE1
AND C.FIELDNAME <> ' '
AND C.FIELDNAME = E.FIELDNAME
AND E.LASTUPDOPRID <> 'PPLSOFT'
AND D.... |
-------------------------------------------------------------------------------
-- Stored Procedure
-------------------------------------------------------------------------------
EXEC InsertCurrency 'AAA', 'Currency Test'
SELECT * from Sales.Currency where CurrencyCode = 'AAA'
--------------------------------... |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SE... |
<gh_stars>0
CREATE TABLE [edfi].[StaffSchoolAssociationGradeLevel] (
[OES_Litho] BIGINT NULL,
[SAID] VARCHAR (8) NULL,
[StaffUSI] INT NULL,
[ProgramAssignmentDescriptorId] INT NULL,
[SchoolId] ... |
CREATE TABLE `authentication_accounts` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
`config` varchar(100) NOT NULL,
PRIMARY KEY (`user_id`,`password`,`username`,`config`) |
INSERT INTO `person` (`id`, `address`, `first_name`, `gender`, `last_name`) VALUES
(1,'<NAME> - Brasil','Ayrton','Male','Senna'),
(2,'Anchiano - Italy','Leandro','Male','da Vinci'),
(3,'Porbandar - India','Mahatma','Male','Gandhi'),
(4,'Kentucky - USA','<NAME>','Male','Gandhi'),
(5,'Mvezo - South Africa','Ne... |
select
tbl.site_name, tbl.box_name, tbl.box_size,
(select fee from shipping_fee_history
where shipping_fee_history.shipping_fee_id = tbl.id1
and current_timestamp < valid_until
order by valid_until
limit 1),
(select fee from shipping_fee_history
where shipping_fee_history.shipping_fee_id = tbl.id2
... |
<reponame>cjeanGitHub/microservice-spring-cloud-159
INSERT INTO `sys_menu` VALUES (1, '用户个人信息', '/admin/user/info/**', 'GET', '2018-08-16 04:56:00', '2019-09-03 10:24:29', 1, 1);
INSERT INTO `sys_menu` VALUES (1, '用户个人信息', '/user/info/**', 'GET', '2018-08-16 04:56:00', '2019-09-03 10:24:29', 1, 1);
|
<filename>HemsServer/src/main/resources/schema.sql<gh_stars>0
CREATE TABLE IF NOT EXISTS SERVICE_SETTING (
service_name varchar(128),
access_key varchar(128),
CONSTRAINT SERVICE_SETTING_PK PRIMARY KEY (service_name)
);
CREATE TABLE IF NOT EXISTS MONITORING_QUEUE_SETTING (
queue_name varchar(128),
CONSTRAINT MONIT... |
SELECT `id`, `name`, `unit`
FROM `measures`
WHERE `deleted` IS NULL; |
INSERT INTO `instruments` (`uri`, `name`)
VALUES (?,?); |
create table TADDRESS (
ADDRESS_ID bigint not null GENERATED BY DEFAULT AS IDENTITY,
VERSION bigint not null DEFAULT 0,
NAME varchar(128),
CITY varchar(128) not null,
POSTCODE varchar(16),
ADDRLINE1 varchar(255) not null,
ADDRLINE2 varchar(255),
ADDRES... |
{% set prefix_with = 'prefix_' if target.type != 'snowflake' else 'PREFIX_' %}
{% set suffix_with = '_suffix' if target.type != 'snowflake' else '_SUFFIX' %}
with data as (
select
{{ dbt_utils.star(from=ref('data_star'), prefix=prefix_with, suffix=suffix_with) }}
from {{ ref('data_star') }}
)
selec... |
<gh_stars>0
-----DBMS-------
CREATE DATABASE edit_profile;
USE edit_profile;
SELECT DATABASE();
CREATE TABLE users(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
PRIMARY KEY(id)
);
DESC us... |
CREATE TABLE [dbo].[SkillQueueItem]
(
[CallID] UNIQUEIDENTIFIER,
[FinishDate] DATETIME NULL,
[FinishedLevel] INT NULL,
[LevelEndSp] INT NULL,
[LevelStartSp] INT NULL,
[QueuePosition] INT NULL,
[SkillId] INT NULL,
[StartDate] DATETIME NULL,
[TrainingStartSp] INT NULL
)
GO
CREATE CLUSTERED INDEX IX_SkillQueueIte... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 23, 2019 at 04:24 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 7.0.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
<reponame>yaitoo/sparrow
CREATE DATABASE IF NOT EXISTS `TransDB`;
USE `TransDB`;
CREATE TABLE `order_00_2019_10_00` (
`id` bigint(20) unsigned NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`amount` decimal(10,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLAT... |
<filename>php/login_system/sql/database_template/groups.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 04. Nov 2019 um 14:48
-- Server-Version: 10.4.8-MariaDB
-- PHP-Version: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT =... |
<reponame>silverAndroid/media-server
DROP TABLE IF EXISTS videos;
CREATE TABLE videos (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
year INTEGER,
tmdb_id INTEGER UNIQUE,
image_url TEXT NOT NULL,
overview TEXT NOT NULL,
UNIQUE (name, year)
);
DROP TABLE IF EXISTS video_lo... |
<gh_stars>0
SELECT * FROM retiring_titles
;
SELECT COUNT(emp_no) FROM mentorship_eligibility;
SELECT title, COUNT(emp_no)
FROM mentorship_eligibility
GROUP BY title
ORDER BY COUNT(emp_no) DESC;
SELECT de.dept_no, ut.title, COUNT(ut.title)
FROM unique_titles as ut
LEFT JOIN dept_emp as de
ON ut.emp_no=de.emp_no
GROUP... |
<reponame>chrisfauerbach/info610_fall_2020
DROP TABLE IF EXISTS CUSTOMERS, CUSTOMER, BRANCHES;
CREATE TABLE branches (id serial primary key, name varchar);
CREATE TABLE customers (
id serial primary key,
branch_id int references branches(id),
name varchar, balance float );
INSERT INTO branches(id, name) values (1, '... |
<reponame>flyingImmortal/SAPress<filename>doc/db/update.sql<gh_stars>0
ALTER TABLE `jbpress_comments` CHANGE `comment_post_ID` `comment_post_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `jbpress_comments` CHANGE `comment_ID` `comment_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `jbpress_commen... |
/**
* @author: KentProjects <<EMAIL>>
* @license: Copyright KentProjects
* @link: http://kentprojects.com
*/
CREATE TABLE IF NOT EXISTS `Like` (
`entity` VARCHAR(64) NOT NULL COMMENT 'Like Root',
`user_id` INT UNSIGNED NOT NULL COMMENT 'Like Author',
`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT... |
<gh_stars>1-10
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: 127.0.0.1 Database: mockserverdb
-- ------------------------------------------------------
-- Server version 5.7.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... |
SELECT name, city --XXX changer nom <-> name et ajouter city
FROM Spectators ; |
<gh_stars>1-10
CREATE TABLE `glpi_plugin_tracker_config_snmp_script` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `nb_process` int(11) NOT NULL DEFAULT '1', `logs` int(1) NOT NULL DEFAULT '0', `lock` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`))
CREATE TABLE IF NOT EXISTS `glpi_plugin_fusinvsnmp_networkportconnectionlogs... |
SELECT l.uid as lesson_uid, sk.id as skill_id, skill_name, round(avg(mark), 2) as average_mark, count(mark) as grade_count FROM
lessons l JOIN subjects su on su.id = l.subject_id
JOIN assignments a ON su.id = a.subject_id JOIN skills sk ON a.skill_id = sk.id
LEFT JOIN grades g ON (g.lesson_uid = l.u... |
<filename>W14-Handlebars/W14-143-11-QuotesApp/MySolved/schema.sql
### Schema
DROP DATABASE IF EXISTS quotes_db;
CREATE DATABASE quotes_db;
USE quotes_db;
CREATE TABLE quotes
(
id int NOT NULL AUTO_INCREMENT,
author varchar(255) NOT NULL,
quote TEXT NOT NULL,
PRIMARY KEY (id)
);
SELECT * FROM quotes: |
-- Problem 8: Create Table Users
CREATE TABLE Users(
Id BIGINT PRIMARY KEY IDENTITY(1,1),
Username VARCHAR(30) NOT NULL,
Password VARCHAR(26) NOT NULL,
ProfilePicture VARBINARY(MAX),
LastLoginTime DATETIME2,
IsDeleted BIT,
CHECK(DATALENGTH(ProfilePicture) <= 921600)
);
INSERT INTO Users(Username,... |
<filename>airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/oracle/test_simple_streams/second_output/airbyte_incremental/test_normalization/renamed_dedup_cdc_excluded.sql<gh_stars>1-10
create table test_normalization.renamed_dedup_cdc_excluded__dbt_tmp
as
-- Final ... |
<filename>sql/pg_eyes--0.6--0.7.sql
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_eyes" to load this file. \quit
-- Function: eyes.get_activity();
/*
Изменена метрика: pg_stat_activity.active_time
Исключены сессии с application_name = "DBA Task" и локал... |
-- All the elements that have FYB in file B (object class program activity) are expected in quarter 1.
WITH object_class_program_activity_a16_{0} AS
(SELECT submission_id,
row_number,
gross_outlay_amount_by_pro_fyb,
gross_outlays_delivered_or_fyb,
gross_outlays_undelivered_fyb,
... |
<gh_stars>0
-- create sequence
CREATE SEQUENCE SEQ_PERSON_EDITABLE_FIELD
INCREMENT BY 1
START WITH 1001
MAXVALUE 9999999999999999999999999999
NOMINVALUE
NOCYCLE
NOCACHE
ORDER;
-- save old table
create table PERSON_EDITABLE_FIELDS_old as select * from PERSON_EDITABLE_FIELDS;
--alter table ... |
--
-- Host: localhost:3306
-- Generation Time: Oct 19, 2018 at 11:12 AM
-- Server version: 5.6.35
-- PHP Version: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `b2c`
--
-- --------------------------------------------------------
--
-- Table structure for table `addons`
--
... |
<reponame>aravi5/drill-test-framework
-- set hive option until HIVE-19069 is fixed
set `store.hive.parquet.optimize_scan_with_native_reader` = true;
-- start query 45 in stream 0 using template query45.tpl
SELECT ca_zip,
ca_state,
Sum(ws_sales_price)
FROM web_sales,
customer,... |
<reponame>hustbill/learn-node
-- select title from dashboard where data like '%data.vds2%'
-- select title from dashboard where data like '%auth%'
-- select * from dashboard order by created desc limit 200
select data from dashboard limit 1;
-- select data from dashboard where data like '%data.vds2%' limit 1
... |
<filename>models/ddl_mysql.sql
create table annotation (
annotationID bigint not null auto_increment,
lastModified datetime not null,
created datetime not null,
type varchar(255) not null,
userProfileID bigint not null,
articleID bigint not null,
annotationUR... |
<filename>deploy/ciip/view/compare_ciip_swrs_emission.sql
-- Deploy ggircs:ciip/view_compare_ciip_swrs_emission to pg
-- requires: ciip/table_emission
-- requires: table_emission
begin;
create or replace view ciip_2018.compare_ciip_swrs_emission as
with ciip_data as (
select application.application_type, ... |
<gh_stars>0
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table category (
id bigint not null,
name varchar(255),
constraint pk_category primary key (id)
);
create sequence category_... |
drop table if exists `like`;
drop table if exists review;
drop table if exists user;
create table user (
userId binary(16) not null,
userActivationToken char(32),
userEmail varchar(255) not null,
userName varchar(128) not null,
unique(userEmail),
unique(userName),
primary key(userId)
);
create table review (
... |
-------------------------------------------------------------------------------
-- <copyright company="Sherlock">
-- Copyright 2013 Sherlock. Licensed under the Apache License, Version 2.0.
-- </copyright>
-------------------------------------------------------------------------------
CREATE PROCEDURE [Test... |
drop table if exists a;
drop table if exists b;
drop table if exists t;
drop table if exists tr_action;
create table t(i int, j int, k int);
create unique index u_t_i on t(i);
create unique index u_t_j_k on t(j, k);
insert into t select rownum, rownum, rownum from _db_class limit 20;
create table tr_action(id int... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: basic_test
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... |
alter table "schedule"."StarredEvent" add constraint "StarredEvent_eventId_registrantId_key" unique ("eventId", "registrantId");
|
<filename>sql/Dump20201009/bdcityclinics_clinica.sql
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: bdcityclinics
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET... |
CREATE PROCEDURE [Monitoring].[SP_MonthlyStats]
@Date DATE
AS
/* Declare variables */
DECLARE @BaseDate DATE
,@EndDate DATE
,@PartMonth BIT
SELECT @Date = ISNULL(@Date,GETDATE())
SELECT @BaseDate = DATEFROMPARTS(YEAR(@Date),MONTH(@Date),1)
SELECT @EndDate = DATEADD(DD,-1,DATEADD(MM,1,@BaseDate))
... |
<filename>assets/info/ocdmonitor.sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 30-06-2021 a las 06:03:59
-- Versión del servidor: 10.4.19-MariaDB
-- Versión de PHP: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time... |
create table xl_impresstype
(
id int(8) not null primary key auto_increment,
impress_type varchar(32) not null
create table xl_impress
(
id varchar(128) not null primary key,
target_id varchar(128) not null,
operator_id varchar(128) not null,
impress_type_id int(8) not null,
impresscontent
);
create table x... |
,customer_id,customer_type_id
|
select *
from workers
where salary>75000; |
USE [ArenaDB]
GO
/****** Object: StoredProcedure [dbo].[luminate_CHART_sp_topXgiversCompair] Script Date: 7/30/2019 10:10:14 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[cust_luminate_CHART_sp_topXgiversCompair]
@numOfTop int, @OrganizationID int
AS
DECLARE @today da... |
{{#unless count}}
LIMIT {{per_page}}
{{#if page}}
OFFSET (({{page}} - 1) * {{per_page}})
{{/if}}
{{/unless}}
|
# This test should actually test outputs, not just parsing.
database output.
base a1 (A10).
type t1 (I9) = a1.
type t2 (I9) = t1, a1.
insert t1 * its a1 = "1".
insert t1 * its a1 = "2".
insert t2 * its t1 = 1, a1 = "2".
extend t2 with e2 = false.
extend t1 with e1 = count t2 where e2 per t1.
# count should be ze... |
<gh_stars>10-100
-- H14. TENURE BY RACE OF HOUSEHOLDER
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_h14 (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
county VARCHAR(3),
cbsa VARCHAR(5),
csa VA... |
-- Number of drafts that selected each position, by draft round
SELECT p.position,
SUM(CASE WHEN p.position = o.r1_pos THEN 1 ELSE 0 END) AS r1,
SUM(CASE WHEN p.position = o.r2_pos THEN 1 ELSE 0 END) AS r2,
SUM(CASE WHEN p.position = o.r3_pos THEN 1 ELSE 0 END) AS r3,
SUM(CASE WHEN p.position = o.r4_po... |
-- file:privileges.sql ln:1189 expect:true
LOCK TABLE lock_table IN ROW EXCLUSIVE MODE
|
<reponame>vickazy/RFID-absensi
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 10, 2017 at 06:06 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... |
--
-- Copyright 2005-2014 The Kuali Foundation
--
-- Licensed under the Educational Community License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.opensource.org/licenses/ecl2.php
--
-- Unless required by ap... |
<reponame>Giovanifsa/NFEStatusBackend<filename>nfestatus/src/main/resources/db/migration/V1__Basic_Data.sql<gh_stars>0
CREATE TABLE NFEStatusSnapshot (
idNFEStatusSnapshot BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
captureMoment TIMESTAMP NOT NULL,
authorizer BIGINT NOT NULL,
nfeStatusAuthorizat... |
<reponame>Pajtak/Generation_MySQL
CREATE TABLE `Temas` (
`id` INT(5) NOT NULL AUTO_INCREMENT,
`descricao` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `Postagens` (
`id` INT NOT NULL AUTO_INCREMENT,
`titulo` varchar(255) NOT NULL,
`texto` varchar(1000) NOT NULL,
`data` TIMESTAMP NOT NULL,
`tema_id... |
-- Run this script directly in the MySQL server query window it will automatically create the database and all the database objects.
DROP DATABASE IF EXISTS Company;
CREATE DATABASE Company;
-- Creating Company Schema
USE Company;
DROP TABLE IF EXISTS DEPARTMENT;
CREATE TABLE DEPARTMENT (
dname varchar(25... |
show parameter db_block_size;
column tablespace_name format a20;
column FILE_NAME format a100;
select file_id, tablespace_name, FILE_NAME, AUTOEXTENSIBLE, (INCREMENT_BY) INC_BY_BLK
from dba_data_files
order by file_id
/
select file_id, tablespace_name, FILE_NAME, AUTOEXTENSIBLE, (INCREMENT_BY) INC_BY_BLK
from dba_te... |
DEFINE USER = joratest
DEFINE PASS = <PASSWORD>
CREATE USER &USER IDENTIFIED BY &PASS
/
GRANT CONNECT, RESOURCE TO &USER
/
CONN &USER/&PASS
/
@src\main\config\create_schema_objects
EXIT;
|
-------------------------------------------------------------------------------
--
-- PLEASE NOTE
--
-- No warranty, no liability, no support.
--
-- This script is 100% at your own risk to use.
--
-------------------------------------------------------------------------------
col job_name format a40
col job_action for... |
<filename>sql/full-text-search/text/options/tokenizer/parameters.sql
CREATE TABLE memos (
tags text
);
INSERT INTO memos VALUES ('PGroonga is fast');
CREATE INDEX pgrn_index ON memos
USING pgroonga (tags)
WITH (tokenizer = 'TokenNgram("n", 3)',
normalizer = '');
SELECT jsonb_pretty(
pgroonga_command('... |
<filename>openGaussBase/testcase/KEYWORDS/Descriptor/Opengauss_Function_Keyword_Descriptor_Case0033.sql
-- @testpoint:opengauss关键字descriptor(非保留),作为视图名
--关键字descriptor作为视图名,不带引号,创建成功
CREATE or replace VIEW descriptor AS
SELECT * FROM pg_tablespace WHERE spcname = 'pg_default';
drop view descriptor;
--关键字descriptor作... |
-- @testpoint:opengauss关键字Analyze(保留),作为外部数据源名
--关键字不带引号-合理报错
create data source Analyze;
--关键字带双引号-成功
drop data source if exists "Analyze";
create data source "Analyze";
drop data source "Analyze";
--关键字带单引号-合理报错
drop data source if exists 'Analyze';
create data source 'Analyze';
--关键字带反引号-合理报错
drop data source i... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 14, 2021 at 07:01 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
create or replace view daq.potenzialflaechen_gaz_basequery as (
select
kampagne,
kampagne_id,
veroeffentlichungsstatus,
'{"sorter":'||(-10000+row_number() OVER (ORDER BY 1))::text
|| ',"string":"'||replace(title,'"','\\"')
||'","glyph":"'||glyph::... |
# From Wikipedia:
# An outer join does not require each record in the two joined tables to have a matching record.
# The joined table retains each record—even if no other matching record exists.
# Outer joins subdivide further into left outer joins, right outer joins, and full outer joins,
# depending on which table's ... |
CREATE DATABASE IF NOT EXISTS apilaravel;
USE apilaravel;
CREATE TABLE users(
id int(255) auto_increment not null,
email varchar(255),
role varchar(20),
name varchar(255),
surname varchar(255),
password varchar(255),
created_at datetime DEFAULT NULL,
updated_at datetime DEFAULT NULL,
remember_token varchar(255),
CON... |
<filename>SQL/Jobs/NextJobRunTimes.sql
select * from
(
select
CASE SJ.next_run_date
WHEN 0 THEN cast('n/a' as char(10))
ELSE convert(char(10), convert(datetime, convert(char(8),SJ.next_run_date)),120) + ' ' + left(stuff((stuff((replicate('0', 6 - len(next_run_time)))+ convert(varchar(6),next_run_... |
/* Query 1 */
SELECT nome, latitude, longitude
FROM local_publico
NATURAL JOIN incidencia
NATURAL JOIN item
GROUP BY latitude, longitude
HAVING count(anomalia_id) >= ALL (
SELECT count(anomalia_id)
FROM local_publico
NATURAL JOIN incidencia
NATURAL JOIN item
GROUP... |
--DROP TABLE Inventorys, Stores, Products
--ALTER TABLE Inventorys
--DROP CONSTRAINT FK_STORE_STOREID
--ALTER TABLE Inventorys
--DROP CONSTRAINT FK_STORES_INVENTORYID
--Alter TAble Products
--DROP CONSTRAINT FK_INVENTORYS_INVENTORYID
--ALTER TABLE Stores
--DROP CONSTRAINT FK_
--drop table products
--Drop table inven... |
ALTER TABLE `crm_contract` ADD `product` char(255) NOT NULL AFTER `code`;
ALTER TABLE `crm_plan` ADD `trade` mediumint(8) UNSIGNED NOT NULL AFTER id;
ALTER TABLE `oa_lieu` ADD `trip` char(255) NOT NULL AFTER `overtime`;
ALTER TABLE `oa_refund` ADD `invoice` DECIMAL(12,2) NOT NULL AFTER `money`;
ALTER TABLE `sys_user`... |
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 1172.16.58.3
-- Generation Time: Sep 22, 2021 at 02:42 AM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 7.4.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
<filename>scripts/mysql_tables.sql
--
-- Database: `clusters`
--
-- --------------------------------------------------------
--
-- Table structure for table `cluster_families`
--
CREATE TABLE `cluster_families` (
`id` int(11) NOT NULL,
`cluster_code` varchar(10) NOT NULL,
`specie_code` varchar(10) NOT NULL,
... |
insert into firings VALUES (NULL, "2018-03-07 07:00:29", "2018-03-07 10:55:29", 6.66, 1, "Test Data", "Testing");
insert into temperature_readings VALUES (NULL,"2018-03-07 07:00:29", (select id from firings where name="Test Data"), 10.34, 6.66);
insert into temperature_readings VALUES (NULL,"2018-03-07 07:05:29", (sele... |
<reponame>jimtheflash/nbastatstools
DROP TABLE IF EXISTS nba.team_games;
CREATE TABLE nba.team_games
(
team_id character varying(255) COLLATE pg_catalog."default" NOT NULL,
team_abbreviation character varying(255) COLLATE pg_catalog."default",
team_name character varying(255) COLLATE pg_catalog."default",
... |
<filename>include/oop.sql
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 08, 2020 at 03:29 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+... |
update eg_wf_matrix set nextaction ='Letter To Party Reply Pending', nextstate = 'LP Created' where nextstatus='Letter To Party Created' and objecttype='BpaApplication';
INSERT INTO eg_wf_matrix (id, department, objecttype, currentstate, currentstatus, pendingactions, currentdesignation, additionalrule, nextstate, ne... |
<filename>examples/queries/data/bar.sql<gh_stars>1-10
/* @parent=tables.t1 */
insert into t2
values (4),
(5); |
--REVOKE SELECT ON bloomapp.BooksUploadedAllTime FROM bloomappuser;
--DROP VIEW bloomapp.BooksUploadedAllTime;
CREATE OR REPLACE VIEW bloomapp.BooksUploadedAllTime AS
SELECT a.url,
MAX(a.timestamp)
FROM bloomapp.upload_book_success AS a
where a.timestamp < date_trunc('month', CURRENT_DATE)
GROUP BY ... |
INSERT INTO Employee VALUES(1,'QA','<EMAIL>','Lama','2018-10-20','Alyousef',16.000);
INSERT INTO Employee VALUES(2,'QA','<EMAIL>','Sadeem','2018-10-20','Alharbi',16.000);
INSERT INTO Employee VALUES(3,'QA','<EMAIL>','Muneearah','2018-10-20','Mu',16.000);
INSERT INTO Employee VALUES(4,'QA','<EMAIL>','Nader','2018-10-20'... |
<gh_stars>10-100
ALTER TABLE hive_posts ALTER COLUMN tags_ids SET STATISTICS 1000;
|
<filename>ethereum/balancer/view_pools_liquidity.sql<gh_stars>100-1000
CREATE SCHEMA IF NOT EXISTS balancer;
CREATE
OR REPLACE VIEW balancer.view_pools_liquidity AS
SELECT
DAY,
pool_id AS pool,
SUM(usd_amount) AS liquidity
FROM
(
SELECT
*
FROM
balancer_v1.view_li... |
CREATE TABLE IF NOT EXISTS episodes(
id INTEGER PRIMARY KEY,
feedID INTEGER NOT NULL,
guid TEXT NOT NULL UNIQUE COLLATE NOCASE,
url TEXT NOT NULL UNIQUE COLLATE NOCASE,
title TEXT NOT NULL,
description TEXT,
published INTEGER NOT NULL,
played... |
/* This file was generated by ODB, object-relational mapping (ORM)
* compiler for C++.
*/
DROP TABLE IF EXISTS `ContinuumComponent`;
CREATE TABLE IF NOT EXISTS `schema_version` (
`name` VARCHAR(255) NOT NULL PRIMARY KEY,
`version` BIGINT UNSIGNED NOT NULL,
`migration` TINYINT(1) NOT NULL)
ENGINE=InnoDB;
DEL... |
-- This is required for generating UUID in PostgreSQL
create extension pgcrypto;
create table users (
apikey char(66) primary key,
address char(42) not null,
ts timestamp not null,
enabled boolean default true
);
create index on users(address);
create table tasks (
id uuid default gen_random_uuid... |
<reponame>ytyaru/Sqlite3.Get.TableMetadata.20190901093225<filename>src/1_table_name.sql<gh_stars>0
.tables
.headers on
select name from sqlite_master;
|
<reponame>kyoto-u/openpanda
--Signup-60
-- add the UUID columns
ALTER TABLE 'signup_meetings' ADD 'vevent_uuid' VARCHAR(255) NULL;
ALTER TABLE 'signup_ts' ADD 'vevent_uuid' VARCHAR(255) NULL;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.